Skip to content

Commit

Permalink
Fix gcc warning in posix port (#1098)
Browse files Browse the repository at this point in the history
Fix warning from "gcc -Wsign-compare" in the file
portable/ThirdParty/GCC/Posix/port.c since PTHREAD_STACK_MIN
is used from system headers.

Signed-off-by: Florian La Roche <[email protected]>
Co-authored-by: Rahul Kar <[email protected]>
laroche and kar-rahul-aws authored Jun 29, 2024
1 parent 646881e commit f4f2e15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion portable/ThirdParty/GCC/Posix/port.c
Original file line number Diff line number Diff line change
@@ -180,7 +180,7 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
thread->xDying = pdFALSE;

/* Ensure ulStackSize is at least PTHREAD_STACK_MIN */
ulStackSize = (ulStackSize < PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : ulStackSize;
ulStackSize = (ulStackSize < ( size_t ) ( PTHREAD_STACK_MIN ) ) ? ( size_t ) ( PTHREAD_STACK_MIN ) : ulStackSize;

pthread_attr_init( &xThreadAttributes );
iRet = pthread_attr_setstacksize( &xThreadAttributes, ulStackSize );

0 comments on commit f4f2e15

Please sign in to comment.