Ticket #65854: patch-glib_tests_atomic.c-pragmas-2.diff
File patch-glib_tests_atomic.c-pragmas-2.diff, 858 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 push 101 #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" 100 /* #pragma GCC diagnostic push */ 101 /* #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" */ 102 102 g_atomic_pointer_set (&vp_str_vol, NULL); 103 103 res = g_atomic_pointer_compare_and_exchange (&vp_str_vol, NULL, str); 104 104 g_assert_true (res); 105 #pragma GCC diagnostic pop 105 /* #pragma GCC diagnostic pop */ 106 106 107 107 g_atomic_pointer_set (&ip, 0); 108 108 ip2 = g_atomic_pointer_get (&ip);