Tests: workaround GCC 4.4.3 warning reported for list_atomic.c 'val'
authorIvan Maidanski <ivmai@mail.ru>
Sat, 17 Aug 2013 09:04:23 +0000 (13:04 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 17 Aug 2013 09:27:15 +0000 (13:27 +0400)
* tests/list_atomic.template (XSIZE_list_atomicXX): Use "static"
modifier for "val" local variable to initialize it (cannot use direct
assignment to zero because "val" type could be a SIMD vector type if
XCTYPE is AO_double_t) to workaround GCC v4.4.3
"'val' is used uninitialized in this function" warning reported for
AO_load.

tests/list_atomic.template

index 3705484..3e748f4 100644 (file)
@@ -19,7 +19,7 @@ void XSIZE_list_atomicXX(void)
      || defined(AO_HAVE_XSIZE_andXX) \
      || defined(AO_HAVE_XSIZE_compare_and_swapXX) \
      || defined(AO_HAVE_XSIZE_fetch_compare_and_swapXX)
-    volatile XCTYPE val;
+    static volatile XCTYPE val /* = 0 */;
 # endif
 # if defined(AO_HAVE_XSIZE_compare_and_swapXX) \
      || defined(AO_HAVE_XSIZE_fetch_compare_and_swapXX)