Skip to content

Commit f4f2e15

Browse files
Fix gcc warning in posix port (#1098)
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]>
1 parent 646881e commit f4f2e15

File tree

1 file changed

+1
-1
lines changed
  • portable/ThirdParty/GCC/Posix

1 file changed

+1
-1
lines changed

portable/ThirdParty/GCC/Posix/port.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
180180
thread->xDying = pdFALSE;
181181

182182
/* Ensure ulStackSize is at least PTHREAD_STACK_MIN */
183-
ulStackSize = (ulStackSize < PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : ulStackSize;
183+
ulStackSize = (ulStackSize < ( size_t ) ( PTHREAD_STACK_MIN ) ) ? ( size_t ) ( PTHREAD_STACK_MIN ) : ulStackSize;
184184

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

0 commit comments

Comments
 (0)