From 57478c3581c29e9fd76ffc8df7e9b635100836a1 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 21 Oct 2011 15:32:19 +0400 Subject: 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. --- src/atomic_ops.c | 3 +-- 1 file changed, 1 insertion(+), 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) { -- cgit v1.2.1