From: Ivan Maidanski Date: Sat, 17 Aug 2013 09:04:23 +0000 (+0400) Subject: Tests: workaround GCC 4.4.3 warning reported for list_atomic.c 'val' X-Git-Tag: libatomic_ops-7_4_0~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=546d513d60c1612549f00590c0cc07def5385af9;p=platform%2Fupstream%2Flibatomic_ops.git Tests: workaround GCC 4.4.3 warning reported for list_atomic.c 'val' * 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. --- diff --git a/tests/list_atomic.template b/tests/list_atomic.template index 3705484..3e748f4 100644 --- a/tests/list_atomic.template +++ b/tests/list_atomic.template @@ -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)