diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2011-10-21 15:32:19 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-10-21 16:15:28 +0400 |
commit | 57478c3581c29e9fd76ffc8df7e9b635100836a1 (patch) | |
tree | d918f3bc9efb16f9c4ce87c8d1f1868477bf5b49 | |
parent | ba3f9cb475ed53014e9b5017771fb0b4b4aa7433 (diff) | |
download | libatomic_ops-57478c3581c29e9fd76ffc8df7e9b635100836a1.tar.gz |
Fix compiler warning in atomic_ops.c (define 'init_lock' only if used)
* src/atomic_ops.c (init_lock): Define only unless AO_USE_NO_SIGNALS.
-rw-r--r-- | src/atomic_ops.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/atomic_ops.c b/src/atomic_ops.c index c46e2d1..b6731a2 100644 --- a/src/atomic_ops.c +++ b/src/atomic_ops.c @@ -162,10 +162,9 @@ AO_INLINE void unlock(volatile AO_TS_t *l) #ifndef AO_USE_NO_SIGNALS static sigset_t all_sigs; static volatile AO_t initialized = 0; + static volatile AO_TS_t init_lock = AO_TS_INITIALIZER; #endif -static volatile AO_TS_t init_lock = AO_TS_INITIALIZER; - int AO_compare_and_swap_emulation(volatile AO_t *addr, AO_t old, AO_t new_val) { |