From 6454d03fb8fac4393cd874a388893a4380eda0ea Mon Sep 17 00:00:00 2001 From: Sergey Markelov Date: Thu, 26 Jan 2023 09:30:52 -0700 Subject: [PATCH] Fix warning: comparison of integers of different signs --- threadpool_winvista.c | 2 +- threadpool_winxp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/threadpool_winvista.c b/threadpool_winvista.c index 83c55c9..b614df6 100644 --- a/threadpool_winvista.c +++ b/threadpool_winvista.c @@ -183,4 +183,4 @@ bool threadpool_delete(void **ctx) { free(threadpool); *ctx = NULL; return true; -} \ No newline at end of file +} diff --git a/threadpool_winxp.c b/threadpool_winxp.c index 644c5b4..cfa4563 100644 --- a/threadpool_winxp.c +++ b/threadpool_winxp.c @@ -149,7 +149,7 @@ static void __cdecl threadpool_do_work(void *arg) { static void threadpool_create_thread_on_demand(threadpool_s *threadpool) { // Create new thread and add it to the list of threads uintptr_t handle = _beginthread(threadpool_do_work, 0, threadpool); - if (handle == -1) + if (handle == (uintptr_t)-1) return; threadpool_thread_s *thread = calloc(1, sizeof(threadpool_thread_s));