findutils-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/3] build: disable -Wformat-nonliteral


From: Bernhard Voelker
Subject: [PATCH 2/3] build: disable -Wformat-nonliteral
Date: Wed, 21 Oct 2020 09:38:09 +0200

GCC-10.2.1 complains about format strings it was not able to check:

  print.c:529:11: warning: format not a string literal, format string not \
                           checked [-Wformat-nonliteral]
    529 |           strftime (altbuf, buf_size, timefmt, &altered_time);
        |           ^~~~~~~~

* configure.ac (compiler-warnings): Add -Wformat-nonliteral.
---
 configure.ac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure.ac b/configure.ac
index 58838422..729ecaf4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -158,6 +158,8 @@ AC_ARG_ENABLE(compiler-warnings,
   WARN_CFLAGS="$WARN_CFLAGS  -Wno-sign-compare"
   # Likewise for -Wunused-parameter: it is implied by -Wunused and -Wextra.
   gl_WARN_ADD([-Wno-unused-parameter])
+  # Likewise for -Wformat-nonliteral: it is implied by -Wformat.
+  gl_WARN_ADD([-Wno-format-nonliteral])
   ])
 
 dnl For --enable-compiler-warnings-are-errors, any GCC compiler
-- 
2.28.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]