>From 7a7dc443d744121d6dd49859bbdf21180e19c7f1 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Sat, 30 Dec 2017 00:32:53 +0100 Subject: [PATCH 2/5] build: add -Wno-unused-parameter The following new warning sneaked in with the gnulib update in the previous commit: In file included from parser.c:49:0: ../gl/lib/stat-time.h: In function 'stat_time_normalize': ../gl/lib/stat-time.h:215:47: error: unused parameter 'st' \ [-Werror=unused-parameter] stat_time_normalize (int result, struct stat *st) ^~ * configure.ac: Add the -Wno-unused-parameter option explicitly as it is implied - and thus overridden - by the more general -Wunused option. --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7388b2f3..d39afed1 100644 --- a/configure.ac +++ b/configure.ac @@ -128,7 +128,6 @@ AC_ARG_ENABLE(compiler-warnings, findutils_marginal="$findutils_marginal -Wpadded" findutils_marginal="$findutils_marginal -Wformat-nonliteral" findutils_marginal="$findutils_marginal -Wunreachable-code" - findutils_marginal="$findutils_marginal -Wunused-parameter" # -Wdouble-promotion generates many warnings when printing values with fprintf. findutils_marginal="$findutils_marginal -Wdouble-promotion" findutils_marginal="$findutils_marginal -Woverlength-strings" @@ -155,6 +154,8 @@ AC_ARG_ENABLE(compiler-warnings, # tricky as they're comparisons between a type we choose and a type the implementation # chooses without stating whether or not it is signed (e.g. time_t). WARN_CFLAGS="$WARN_CFLAGS -Wno-sign-compare" + # Likewise for -Wunused-parameter: it is implied by -Wunused and -Wextra. + gl_WARN_ADD([-Wno-unused-parameter]) ]) dnl For --enable-compiler-warnings-are-errors, any GCC compiler -- 2.15.1