From f4f2e1596b08f70ab1e193771c0f38e2ee351091 Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Sat, 29 Jun 2024 17:20:45 +0200 Subject: [PATCH] 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 Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com> --- portable/ThirdParty/GCC/Posix/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index 05f08cf7c..0b18da4df 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -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 );