summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Leech <andrew.leech@planetinnovation.com.au>2025-06-06 09:56:40 +1000
committerDamien George <damien@micropython.org>2025-07-24 13:29:36 +1000
commitbc77b27badaa4dfbebcc542ecb8ac41480e75787 (patch)
tree2208da40ba9575ac4df69f4ecd63585d14963891
parent7729e80fdddbd9f75cb350de70a84ed26cb601fd (diff)
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 <andrew.leech@planetinnovation.com.au>
-rw-r--r--ports/unix/mpthreadport.c4
1 files 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