From: Florian Krohm Date: Fri, 5 Sep 2014 18:30:05 +0000 (+0000) Subject: Fix most clang warnings. X-Git-Tag: svn/VALGRIND_3_10_0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed872a701449e21af578595473df624d12548b6c;p=thirdparty%2Fvalgrind.git Fix most clang warnings. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14467 --- diff --git a/configure.ac b/configure.ac index 05848733e4..878d37d75c 100644 --- a/configure.ac +++ b/configure.ac @@ -1773,6 +1773,8 @@ AC_GCC_WARNING_SUBST_NO([tautological-compare], [FLAG_W_NO_TAUTOLOGICAL_COMPARE] AC_GCC_WARNING_SUBST_NO([nonnull], [FLAG_W_NO_NONNULL]) AC_GCC_WARNING_SUBST_NO([overflow], [FLAG_W_NO_OVERFLOW]) AC_GCC_WARNING_SUBST_NO([uninitialized], [FLAG_W_NO_UNINITIALIZED]) +AC_GCC_WARNING_SUBST_NO([unused-function], [FLAG_W_NO_UNUSED_FUNCTION]) +AC_GCC_WARNING_SUBST_NO([static-local-in-inline], [FLAG_W_NO_STATIC_LOCAL_IN_INLINE]) # does this compiler support -Wextra or the older -W ? diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index 45d3a54e31..eb5b1ffb13 100644 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -468,6 +468,7 @@ annotate_smart_pointer_SOURCES = annotate_smart_pointer.cpp endif annotate_static_SOURCES = annotate_static.cpp +annotate_static_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_UNUSED_FUNCTION@ local_static_SOURCES = local_static.cpp diff --git a/drd/tests/tsan_unittest.cpp b/drd/tests/tsan_unittest.cpp index 956a17e627..57bb3107cc 100644 --- a/drd/tests/tsan_unittest.cpp +++ b/drd/tests/tsan_unittest.cpp @@ -7757,8 +7757,8 @@ namespace test513 { const int N_THREADS = 2, HG_CACHELINE_SIZE = 1 << 6, ARRAY_SIZE = HG_CACHELINE_SIZE * 512, - MUTEX_ID_BITS = 8, - MUTEX_ID_MASK = (1 << MUTEX_ID_BITS) - 1; + MUTEX_ID_BITS = 8; +// MUTEX_ID_MASK = (1 << MUTEX_ID_BITS) - 1; // Each thread has its own cacheline and tackles with it intensively const int ITERATIONS = 1024; diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 94242fedb8..f82b5e48eb 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -422,11 +422,7 @@ fprw_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ inits_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ -if COMPILER_IS_CLANG -inlinfo_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ -Wno-static-local-in-inline -else -inlinfo_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ -endif +inlinfo_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ @FLAG_W_NO_STATIC_LOCAL_IN_INLINE@ inltemplate_SOURCES = inltemplate.cpp inltemplate_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_UNINITIALIZED@