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>
This commit is contained in:
committed by
Damien George
parent
7729e80fdd
commit
bc77b27bad
@@ -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
|
// minimum stack size is set by pthreads
|
||||||
if (*stack_size < PTHREAD_STACK_MIN) {
|
if (*stack_size < (size_t)PTHREAD_STACK_MIN) {
|
||||||
*stack_size = PTHREAD_STACK_MIN;
|
*stack_size = (size_t)PTHREAD_STACK_MIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure there is enough stack to include a stack-overflow margin
|
// ensure there is enough stack to include a stack-overflow margin
|
||||||
|
|||||||
Reference in New Issue
Block a user