Fix discard qualifier warning in glib/tests/atomic.c

glib/tests/atomic.c:132:18: warning: passing 'typeof (*(cspp)) *' (aka 'const int *const *') to parameter of type 'const gint **' (aka 'const int **') discards qualifiers
  g_assert_true (g_atomic_pointer_get (cspp) == csp);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
glib/gatomic.h:117:38: note: expanded from macro 'g_atomic_pointer_get'
    __atomic_load (gapg_temp_atomic, (&(gapg_temp_newval)), __ATOMIC_SEQ_CST); \
                                     ^~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Emmanuel Fleury 2021-05-04 09:25:13 +02:00
parent a369efd207
commit 2b4bf535f1

View File

@ -129,7 +129,7 @@ test_types (void)
g_assert_cmpuint (gs, ==, 8);
g_assert_cmpint (g_atomic_int_get (csp), ==, s);
g_assert_true (g_atomic_pointer_get (cspp) == csp);
g_assert_true (g_atomic_pointer_get ((const gint **) cspp) == csp);
/* repeat, without the macros */
#undef g_atomic_int_set