Skip to content

Commit bc77b27

Browse files
pi-anldpgeorge
authored andcommitted
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 <[email protected]>
1 parent 7729e80 commit bc77b27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/unix/mpthreadport.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ mp_uint_t mp_thread_create(void *(*entry)(void *), void *arg, size_t *stack_size
250250
}
251251

252252
// minimum stack size is set by pthreads
253-
if (*stack_size < PTHREAD_STACK_MIN) {
254-
*stack_size = PTHREAD_STACK_MIN;
253+
if (*stack_size < (size_t)PTHREAD_STACK_MIN) {
254+
*stack_size = (size_t)PTHREAD_STACK_MIN;
255255
}
256256

257257
// ensure there is enough stack to include a stack-overflow margin

0 commit comments

Comments
 (0)