Mark the `spin` variable in atomic.c as G_GNUC_UNUSED.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Sat, 7 Jun 2014 14:13:22 +0000 (16:13 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Sat, 7 Jun 2014 14:13:22 +0000 (16:13 +0200)
It would require an `#ifdef` forest to get the conditions
under which it is used right.

mono/utils/atomic.c

index 7cd884e61d9fb3dd6eaf78dcb34998321fcaef2f..3fdd34d5bf417b0cfacfb3e93e7918eee4988c14 100755 (executable)
 
 #include <mono/utils/atomic.h>
 
-#if defined (WAPI_NO_ATOMIC_ASM) || defined (BROKEN_64BIT_ATOMICS_INTRINSIC)
+#if defined (WAPI_NO_ATOMIC_ASM) || (defined (BROKEN_64BIT_ATOMICS_INTRINSIC) && !defined (TARGET_OSX))
 
 #include <pthread.h>
 
-static pthread_mutex_t spin = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t spin G_GNUC_UNUSED = PTHREAD_MUTEX_INITIALIZER;
 
 #define NEED_64BIT_CMPXCHG_FALLBACK