diff --git a/src/threadpool.c b/src/threadpool.c index 199bcf538c8b0a3d18e34cdab4a60c51fe8d188b..1bec817fed1cf4459c399de7e2fa6a40aedbee1f 100644 --- a/src/threadpool.c +++ b/src/threadpool.c @@ -321,7 +321,7 @@ void threadpool_map(struct threadpool *tp, threadpool_map_function map_function, tp->map_data_count = 0; if (chunk == threadpool_auto_chunk_size) { tp->map_data_chunk = - max((N / (tp->num_threads * threadpool_default_chunk_ratio)), 1); + max((N / (tp->num_threads * threadpool_default_chunk_ratio)), 1U); } else if (chunk == threadpool_uniform_chunk_size) { tp->map_data_chunk = threadpool_uniform_chunk_size; } else {