From 3951ccffae110b6fb22436a828f14322cfaa125a Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Fri, 20 Nov 2020 22:52:46 +0100 Subject: [PATCH] Fix signedness warning in tests/thread-test.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests/thread-test.c: In function ‘test_g_static_private’: tests/thread-test.c:214:60: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’} 214 | g_assert (GPOINTER_TO_INT (g_thread_join (threads[i])) == i * 3); | ^~ glib/gmacros.h:941:25: note: in definition of macro ‘G_LIKELY’ 941 | #define G_LIKELY(expr) (expr) | ^~~~ tests/thread-test.c:214:5: note: in expansion of macro ‘g_assert’ 214 | g_assert (GPOINTER_TO_INT (g_thread_join (threads[i])) == i * 3); | ^~~~~~~~ --- tests/thread-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/thread-test.c b/tests/thread-test.c index 17ac41f7b..883aa5424 100644 --- a/tests/thread-test.c +++ b/tests/thread-test.c @@ -211,7 +211,7 @@ test_g_static_private (void) test_g_static_private_ready = 0; for (i = 0; i < THREADS; i++) - g_assert (GPOINTER_TO_INT (g_thread_join (threads[i])) == i * 3); + g_assert (GPOINTER_TO_UINT (g_thread_join (threads[i])) == i * 3); g_assert (test_g_static_private_counter == 0); }