Ticket #65854: patch-glib_tests_atomic.c-pragmas-1.diff
File patch-glib_tests_atomic.c-pragmas-1.diff, 719 bytes (added by ballapete (Peter "Pete" Dyballa), 2 years ago) |
---|
-
glib/tests/atomic.c
old new 97 97 /* Note that atomic variables should almost certainly not be marked as 98 98 * `volatile` — see http://isvolatileusefulwiththreads.in/c/. This test exists 99 99 * to make sure that we don’t warn when built against older third party code. */ 100 #pragma GCC diagnostic push101 #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"102 100 g_atomic_pointer_set (&vp_str_vol, NULL); 103 101 res = g_atomic_pointer_compare_and_exchange (&vp_str_vol, NULL, str); 104 102 g_assert_true (res); 105 #pragma GCC diagnostic pop106 103 107 104 g_atomic_pointer_set (&ip, 0); 108 105 ip2 = g_atomic_pointer_get (&ip);