Fix double old/new_w local variables declaration in test_atomic_include
authorIvan Maidanski <ivmai@mail.ru>
Sun, 7 Oct 2012 12:54:02 +0000 (16:54 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 7 Oct 2012 12:54:02 +0000 (16:54 +0400)
* tests/test_atomic_include.template (test_atomicXX): Move old_w and
new_w local variables declaration up to precede the first statement
(only if AO_HAVE_double_compare_and_swapXX).

tests/test_atomic_include.template

index 8593047..8d4efc7 100644 (file)
@@ -25,6 +25,10 @@ void test_atomicXX(void)
 # if defined(AO_HAVE_test_and_setXX)
     AO_TS_t z = AO_TS_INITIALIZER;
 # endif
+# if defined(AO_HAVE_double_compare_and_swapXX)
+    AO_double_t old_w;
+    AO_double_t new_w;
+# endif
 # if defined(AO_HAVE_compare_and_swap_doubleXX) \
      || defined(AO_HAVE_compare_double_and_swap_doubleXX) \
      || defined(AO_HAVE_double_compare_and_swapXX)
@@ -32,10 +36,6 @@ void test_atomicXX(void)
     w.AO_val1 = 0;
     w.AO_val2 = 0;
 # endif
-# if defined(AO_HAVE_double_compare_and_swapXX)
-    AO_double_t old_w;
-    AO_double_t new_w;
-# endif
 
 # if defined(AO_HAVE_nopXX)
     AO_nopXX();