Fix signedness warning in tests/thread-test.c

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);
      |     ^~~~~~~~
This commit is contained in:
Emmanuel Fleury 2020-11-20 22:52:46 +01:00
parent 45cc35c5cc
commit 3951ccffae

View File

@ -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);
}