mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 20:22:11 +01:00
tests: Ignore warning about use of volatile from a test for exactly that
Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2418
This commit is contained in:
parent
04739eb4fd
commit
91759dbd63
@ -97,9 +97,12 @@ test_types (void)
|
||||
/* Note that atomic variables should almost certainly not be marked as
|
||||
* `volatile` — see http://isvolatileusefulwiththreads.in/c/. This test exists
|
||||
* to make sure that we don’t warn when built against older third party code. */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
|
||||
g_atomic_pointer_set (&vp_str_vol, NULL);
|
||||
res = g_atomic_pointer_compare_and_exchange (&vp_str_vol, NULL, str);
|
||||
g_assert_true (res);
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
g_atomic_pointer_set (&ip, 0);
|
||||
ip2 = g_atomic_pointer_get (&ip);
|
||||
|
Loading…
x
Reference in New Issue
Block a user