Skip to content

Commit

Permalink
Fix gcc warning in posix port
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]>
  • Loading branch information
laroche committed Jun 29, 2024
1 parent 17dfd0f commit 5455498
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
Expand Up @@ -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 );
Expand Down

0 comments on commit 5455498

Please sign in to comment.