mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-15 20:25:12 +01:00
Coerce type cast to void* because it causes compiler warnings
glib/gtestutils.c:4261:11: warning: incompatible pointer types passing 'gpointer *' (aka 'void **') to parameter of type 'GSList **' (aka 'struct _GSList **') while (!g_atomic_pointer_compare_and_exchange (test_filename_free_list, node->next, node)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ glib/gatomic.h:215:44: note: expanded from macro 'g_atomic_pointer_compare_and_exchange' __atomic_compare_exchange_n ((atomic), &gapcae_oldval, (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \ ^~~~~~~~~~~~~~
This commit is contained in:
parent
1176835ce3
commit
f304df34c7
@ -157,7 +157,7 @@ G_END_DECLS
|
||||
gint gaicae_oldval = (oldval); \
|
||||
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \
|
||||
(void) (0 ? *(atomic) ^ (newval) ^ (oldval) : 1); \
|
||||
__atomic_compare_exchange_n ((atomic), &gaicae_oldval, (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \
|
||||
__atomic_compare_exchange_n ((atomic), (void *) (&(gaicae_oldval)), (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \
|
||||
}))
|
||||
#define g_atomic_int_add(atomic, val) \
|
||||
(G_GNUC_EXTENSION ({ \
|
||||
@ -208,7 +208,7 @@ G_END_DECLS
|
||||
gpointer gapcae_oldval = (gpointer)(oldval); \
|
||||
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
|
||||
(void) (0 ? (gpointer) *(atomic) : NULL); \
|
||||
__atomic_compare_exchange_n ((atomic), &gapcae_oldval, (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \
|
||||
__atomic_compare_exchange_n ((atomic), (void *) (&(gapcae_oldval)), (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \
|
||||
}))
|
||||
#endif /* defined(glib_typeof) */
|
||||
#define g_atomic_pointer_add(atomic, val) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user