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)

Simple patch to comment the three #pragma lines

  • glib/tests/atomic.c

    old new  
    9797  /* Note that atomic variables should almost certainly not be marked as
    9898   * `volatile` — see http://isvolatileusefulwiththreads.in/c/. This test exists
    9999   * 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" */
    102102  g_atomic_pointer_set (&vp_str_vol, NULL);
    103103  res = g_atomic_pointer_compare_and_exchange (&vp_str_vol, NULL, str);
    104104  g_assert_true (res);
    105 #pragma GCC diagnostic pop
     105/* #pragma GCC diagnostic pop */
    106106
    107107  g_atomic_pointer_set (&ip, 0);
    108108  ip2 = g_atomic_pointer_get (&ip);