summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2014-12-29 12:57:52 +0100
committerSzymon Janc <szymon.janc@tieto.com>2015-01-02 17:59:46 +0100
commit6a9ca37f379fe8587fabc865d94263b84e8cdcbe (patch)
treeb453e0c2c199462ddb35396f01dccb7e31fcbbf5 /acinclude.m4
parentc5569d773b96d1f528d4ab9ce1ed2bf30c45fcbe (diff)
downloadbluez-6a9ca37f379fe8587fabc865d94263b84e8cdcbe.tar.gz
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.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m41
1 files changed, 1 insertions, 0 deletions
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"