]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
autogen.sh: Enable -Werror=stringop-* diagnostics
authorAlejandro Colomar <alx@kernel.org>
Fri, 5 Dec 2025 17:12:02 +0000 (18:12 +0100)
committerSerge Hallyn <serge@hallyn.com>
Wed, 15 Jul 2026 16:11:00 +0000 (11:11 -0500)
We can't enable -Wstringop-overread because it has bogus diagnostics
with legitimate strncat(3) calls.

We can't enable -Wstringop-truncation because it has bogus diagnostics
with legitimate strncpy(3) calls.

Link: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123024>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
autogen.sh

index f1740d16630e9623f20b2b48033b6ae587632dbc..6ffdf2fc0a4b2d7bb5679a76b0cfbf4d27f11cf2 100755 (executable)
@@ -14,6 +14,7 @@ CFLAGS="$CFLAGS -Werror=incompatible-pointer-types"
 CFLAGS="$CFLAGS -Werror=int-conversion"
 CFLAGS="$CFLAGS -Werror=overflow"
 CFLAGS="$CFLAGS -Werror=sizeof-pointer-div"
+CFLAGS="$CFLAGS -Werror=stringop-overflow=4"
 CFLAGS="$CFLAGS -Werror=unused-but-set-parameter"
 CFLAGS="$CFLAGS -Werror=unused-function"
 CFLAGS="$CFLAGS -Werror=unused-label"