From 7ef6edc817257d080b3f04ec479a7a666f3bfe68 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 18 Apr 2026 12:18:18 -0700 Subject: [PATCH] build: avoid -Wformat-nonliteral warning sed/utils.c:236:11: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] * configure.ac: Remove ineffective nw="$nw -Wformat-nonliteral" and instead use targeted gl_WARN_ADD([-Wno-format-nonliteral]) --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 451e083..159df0a 100644 --- a/configure.ac +++ b/configure.ac @@ -238,7 +238,6 @@ if test "$gl_gcc_warnings" = yes; then nw="$nw -Wdeclaration-after-statement" # too useful to forbid nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings nw="$nw -Wsign-conversion" # Too many warnings for now - nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses nw="$nw -Wswitch-default" # Too many warnings for now gl_MANYWARN_ALL_GCC([ws]) @@ -247,6 +246,7 @@ if test "$gl_gcc_warnings" = yes; then gl_WARN_ADD([$w]) done gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now + gl_WARN_ADD([-Wno-format-nonliteral]) # ngettext in ck_fwrite # clang is unduly picky about some things. AC_CACHE_CHECK([whether the compiler is clang], [utils_cv_clang],