From 6a9ca37f379fe8587fabc865d94263b84e8cdcbe Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Mon, 29 Dec 2014 12:57:52 +0100 Subject: build: Enable -Wformat -Wformat-security in maintainer mode __attribute__((format(printf))) doesn't seem to catch missing format string in function call ie. char *p = "foo"; printf(p); vs printf("%s", p); Enabling -Wformat -Wformat-security warns in such case. --- acinclude.m4 | 1 + 1 file changed, 1 insertion(+) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index 960d54cac..bc39c6d73 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -21,6 +21,7 @@ AC_DEFUN([COMPILER_FLAGS], [ with_cflags="$with_cflags -Wredundant-decls" with_cflags="$with_cflags -Wcast-align" with_cflags="$with_cflags -Wswitch-enum" + with_cflags="$with_cflags -Wformat -Wformat-security" with_cflags="$with_cflags -DG_DISABLE_DEPRECATED" with_cflags="$with_cflags -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_28" with_cflags="$with_cflags -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_28" -- cgit v1.2.1