]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
build-sys: treat format errors as fatal (#4910)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 18 Dec 2016 20:47:41 +0000 (15:47 -0500)
committerMartin Pitt <martin.pitt@ubuntu.com>
Sun, 18 Dec 2016 20:47:41 +0000 (21:47 +0100)
We currently don't expect any warnings about format strings, on any
architecture (#4612 removed the last few warnings). Turn those warnings into
errors in the future.

As requested by Martin Pitt.

gcc documentation says that -Wformat=2 includes -Wformat-security and
-Wformat-nonliteral so don't include them explicitly.

configure.ac

index 4a05702094b0c585e4c242952b6f6dc1d2ddec7c..a071bfa69e7c4db5a76e3d07f503a55f07ea4100 100644 (file)
@@ -155,7 +155,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -Wall \
         -Wextra \
         -Wundef \
-        "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
         -Wlogical-op \
         -Wmissing-include-dirs \
         -Wold-style-definition \
@@ -168,6 +167,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -Werror=implicit-function-declaration \
         -Werror=missing-declarations \
         -Werror=return-type \
+        -Werror=format=2 \
         -Wstrict-prototypes \
         -Wredundant-decls \
         -Wmissing-noreturn \