gfileutils: Add missing g_free() in error path
[platform/upstream/glib.git] / glib / tests / 1bit-mutex.c
index c1ec41c..897bd4b 100644 (file)
@@ -10,6 +10,8 @@
  * See the included COPYING file for more information.
  */
 
+#include "config.h"
+
 /* LOCKS should be more than the number of contention
  * counters in gthread.c in order to ensure we exercise
  * the case where they overlap.
 #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 +52,8 @@
   #define G_BIT_LOCK_FORCE_FUTEX_EMULATION
 
   #include <glib/gbitlock.c>
+
+#pragma GCC diagnostic pop
 #endif
 
 volatile GThread *owners[LOCKS];
@@ -61,7 +69,7 @@ acquire (int      nr,
 
   self = g_thread_self ();
 
-  g_assert_cmpint (((gsize) ptrs) % 8, ==, 0);
+  g_assert_cmpint (((gsize) ptrs) % sizeof(gint), ==, 0);
 
   if (!(use_pointers ?
           g_pointer_bit_trylock (&ptrs[nr], bits[nr])