mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 08:26:14 +01:00
Fix incompatible pointer to integer conversion warning in glib/tests/atomic.c
lib/tests/atomic.c:115:9: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'gsize' (aka 'unsigned long') res = g_atomic_pointer_compare_and_exchange (&gs, NULL, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ glib/gatomic.h:225:34: note: expanded from macro 'g_atomic_pointer_compare_and_exchange' (newval), FALSE, \ ^~~~~~~~
This commit is contained in:
parent
2b4bf535f1
commit
bf536a5ce2
@ -112,7 +112,7 @@ test_types (void)
|
|||||||
vp2 = (gpointer) g_atomic_pointer_get (&gs);
|
vp2 = (gpointer) g_atomic_pointer_get (&gs);
|
||||||
gs2 = (gsize) vp2;
|
gs2 = (gsize) vp2;
|
||||||
g_assert_cmpuint (gs2, ==, 0);
|
g_assert_cmpuint (gs2, ==, 0);
|
||||||
res = g_atomic_pointer_compare_and_exchange (&gs, NULL, NULL);
|
res = g_atomic_pointer_compare_and_exchange (&gs, NULL, (gsize) NULL);
|
||||||
g_assert_true (res);
|
g_assert_true (res);
|
||||||
g_assert_cmpuint (gs, ==, 0);
|
g_assert_cmpuint (gs, ==, 0);
|
||||||
gs2 = (gsize) g_atomic_pointer_add (&gs, 5);
|
gs2 = (gsize) g_atomic_pointer_add (&gs, 5);
|
||||||
|
Loading…
Reference in New Issue
Block a user