Commit 9e3e7ba3 authored by Richard Henderson's avatar Richard Henderson Committed by Richard Henderson

Avoid "unused variable" warnings from non-debug, non-smp spinlock macros.

parent 0b3a14fb
......@@ -84,12 +84,12 @@
#define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
#endif
#define spin_lock_init(lock) do { } while(0)
#define spin_lock_init(lock) do { (void)(lock); } while(0)
#define _raw_spin_lock(lock) (void)(lock) /* Not "unused variable". */
#define spin_is_locked(lock) (0)
#define _raw_spin_trylock(lock) ({1; })
#define spin_unlock_wait(lock) do { } while(0)
#define _raw_spin_unlock(lock) do { } while(0)
#define spin_is_locked(lock) ((void)(lock), 0)
#define _raw_spin_trylock(lock) ((void)(lock), 1)
#define spin_unlock_wait(lock) do { (void)(lock); } while(0)
#define _raw_spin_unlock(lock) do { (void)(lock); } while(0)
#elif (DEBUG_SPINLOCKS < 2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment