[glib: 5/7] Fix discard qualifier warning in glib/tests/atomic.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 5/7] Fix discard qualifier warning in glib/tests/atomic.c
- Date: Thu, 27 May 2021 10:00:29 +0000 (UTC)
commit 2b4bf535f1364276d9e562c1fb02ff8a4c7544fd
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Tue May 4 09:25:13 2021 +0200
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); \
^~~~~~~~~~~~~~~~~~~~~
glib/tests/atomic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/tests/atomic.c b/glib/tests/atomic.c
index 14e6e454e..82d98b2db 100644
--- a/glib/tests/atomic.c
+++ b/glib/tests/atomic.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]