From 096bcbf0590e9c6a13f5627ef3d21ba552a55805 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sat, 16 May 2015 16:17:52 +0000 Subject: [PATCH] Enable a few more compiler warnings. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15243 --- Makefile.all.am | 3 +++ configure.ac | 4 +++- coregrind/m_signals.c | 2 +- memcheck/tests/vbit-test/vtest.h | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile.all.am b/Makefile.all.am index 282c791c2e..d58754823f 100644 --- a/Makefile.all.am +++ b/Makefile.all.am @@ -110,6 +110,9 @@ AM_CFLAGS_BASE = \ @FLAG_W_WRITE_STRINGS@ \ @FLAG_W_FORMAT@ \ @FLAG_W_FORMAT_SECURITY@ \ + @FLAG_W_IGNORED_QUALIFIERS@ \ + @FLAG_W_MISSING_PARAMETER_TYPE@ \ + @FLAG_W_OLD_STYLE_DECLARATION@ \ @FLAG_FNO_STACK_PROTECTOR@ \ @FLAG_FSANITIZE@ \ -fno-strict-aliasing \ diff --git a/configure.ac b/configure.ac index d03aa5c0c4..7faeac2991 100644 --- a/configure.ac +++ b/configure.ac @@ -1760,7 +1760,9 @@ AC_GCC_WARNING_SUBST([write-strings], [FLAG_W_WRITE_STRINGS]) AC_GCC_WARNING_SUBST([format], [FLAG_W_FORMAT]) AC_GCC_WARNING_SUBST([format-security], [FLAG_W_FORMAT_SECURITY]) AC_GCC_WARNING_SUBST([cast-qual], [FLAG_W_CAST_QUAL]) - +AC_GCC_WARNING_SUBST([old-style-declaration], [FLAG_W_OLD_STYLE_DECLARATION]) +AC_GCC_WARNING_SUBST([ignored-qualifiers], [FLAG_W_IGNORED_QUALIFIERS]) +AC_GCC_WARNING_SUBST([missing-parameter-type], [FLAG_W_MISSING_PARAMETER_TYPE]) # does this compiler support -Wextra or the older -W ? diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c index 0bfdf73b33..abfa0d72c4 100644 --- a/coregrind/m_signals.c +++ b/coregrind/m_signals.c @@ -1794,7 +1794,7 @@ static void default_action(const vki_siginfo_t *info, ThreadId tid) } if (core) { - const static struct vki_rlimit zero = { 0, 0 }; + static const struct vki_rlimit zero = { 0, 0 }; VG_(make_coredump)(tid, info, corelim.rlim_cur); diff --git a/memcheck/tests/vbit-test/vtest.h b/memcheck/tests/vbit-test/vtest.h index e73cee0bee..62ba126644 100644 --- a/memcheck/tests/vbit-test/vtest.h +++ b/memcheck/tests/vbit-test/vtest.h @@ -125,7 +125,7 @@ unsigned sizeof_irtype(IRType); void typeof_primop(IROp, IRType *t_dst, IRType *t_arg1, IRType *t_arg2, IRType *t_arg3, IRType *t_arg4); -static unsigned __inline__ bitsof_irtype(IRType type) +static __inline__ unsigned bitsof_irtype(IRType type) { return type == Ity_I1 ? 1 : sizeof_irtype(type) * 8; } -- 2.47.3