From bc77b27badaa4dfbebcc542ecb8ac41480e75787 Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Fri, 6 Jun 2025 09:56:40 +1000 Subject: [PATCH] unix/mpthreadport: Ensure consistent type of PTHREAD_STACK_MIN. It seems GCC 14 got stricter with warn/errs like -Wsign-compare and types a "bare number" as a long int that can't be compared to a (unsigned) size_t. Signed-off-by: Andrew Leech --- ports/unix/mpthreadport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/unix/mpthreadport.c b/ports/unix/mpthreadport.c index ded3bd14a..141cd0218 100644 --- a/ports/unix/mpthreadport.c +++ b/ports/unix/mpthreadport.c @@ -250,8 +250,8 @@ mp_uint_t mp_thread_create(void *(*entry)(void *), void *arg, size_t *stack_size } // minimum stack size is set by pthreads - if (*stack_size < PTHREAD_STACK_MIN) { - *stack_size = PTHREAD_STACK_MIN; + if (*stack_size < (size_t)PTHREAD_STACK_MIN) { + *stack_size = (size_t)PTHREAD_STACK_MIN; } // ensure there is enough stack to include a stack-overflow margin