tests/1bitmutex: Hack to build with -Werror=missing-prototypes
authorColin Walters <walters@verbum.org>
Thu, 1 Nov 2012 23:37:38 +0000 (19:37 -0400)
committerColin Walters <walters@verbum.org>
Fri, 2 Nov 2012 00:12:02 +0000 (20:12 -0400)
Admittedly, this could probably be better, but it builds.

https://bugzilla.gnome.org/show_bug.cgi?id=687385

glib/tests/1bit-mutex.c

index 8811cd3..881f1a6 100644 (file)
 #include <glib.h>
 
 #if TEST_EMULATED_FUTEX
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+
   /* this is defined for the 1bit-mutex-emufutex test.
    *
    * we want to test the emulated futex even if futex(2) is available.
@@ -46,6 +50,8 @@
   #define G_BIT_LOCK_FORCE_FUTEX_EMULATION
 
   #include <glib/gbitlock.c>
+
+#pragma GCC diagnostic pop
 #endif
 
 volatile GThread *owners[LOCKS];