Permalink
Browse files

Define 'w' local variable in test_atomic_include.h only if used

* tests/test_atomic_include.template (test_atomicXX): Define "w" local
variable only if AO_HAVE_compare_[double_]and_swap_double.
  • Loading branch information...
1 parent 0709102 commit 1a91a17e54a9301e91512a85d5223a6253aacff3 @ivmai ivmai committed Nov 14, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 tests/test_atomic_include.template
View
3 tests/test_atomic_include.template
@@ -25,7 +25,8 @@ void test_atomicXX(void)
# if defined(AO_HAVE_test_and_setXX)
AO_TS_t z = AO_TS_INITIALIZER;
# endif
-# if defined(AO_HAVE_double_t)
+# if defined(AO_HAVE_compare_and_swap_doubleXX) \
+ || defined(AO_HAVE_compare_double_and_swap_doubleXX)
AO_double_t w;
w.AO_val1 = 0;
w.AO_val2 = 0;

0 comments on commit 1a91a17

Please sign in to comment.