[glib/wip/lantw/gatomic-freebsd-2: 2/2] Address a few type-checking warnings



commit e5c47811f980f6e8d6a21e48b44852b7ab5c36ad
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Mon Nov 18 22:11:31 2019 +0800

    Address a few type-checking warnings

 glib/tests/atomic.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glib/tests/atomic.c b/glib/tests/atomic.c
index 5926e3135..9b4d8004a 100644
--- a/glib/tests/atomic.c
+++ b/glib/tests/atomic.c
@@ -83,14 +83,14 @@ test_types (void)
   res = g_atomic_pointer_compare_and_exchange (&vp, &s, &s);
   g_assert_false (res);
   g_assert_true (vp == 0);
-  res = g_atomic_pointer_compare_and_exchange (&vp, 0, 0);
+  res = g_atomic_pointer_compare_and_exchange (&vp, NULL, NULL);
   g_assert_true (res);
   g_assert_true (vp == 0);
 
   g_atomic_pointer_set (&ip, 0);
   ip2 = g_atomic_pointer_get (&ip);
   g_assert_true (ip2 == 0);
-  res = g_atomic_pointer_compare_and_exchange (&ip, 0, 0);
+  res = g_atomic_pointer_compare_and_exchange (&ip, NULL, NULL);
   g_assert_true (res);
   g_assert_true (ip == 0);
 
@@ -98,7 +98,7 @@ test_types (void)
   vp2 = (gpointer) g_atomic_pointer_get (&gs);
   gs2 = (gsize) vp2;
   g_assert_cmpuint (gs2, ==, 0);
-  res = g_atomic_pointer_compare_and_exchange (&gs, 0, 0);
+  res = g_atomic_pointer_compare_and_exchange (&gs, NULL, NULL);
   g_assert_true (res);
   g_assert_cmpuint (gs, ==, 0);
   gs2 = (gsize) g_atomic_pointer_add (&gs, 5);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]