diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2014-12-29 12:57:52 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-01-02 17:59:46 +0100 |
commit | 6a9ca37f379fe8587fabc865d94263b84e8cdcbe (patch) | |
tree | b453e0c2c199462ddb35396f01dccb7e31fcbbf5 /acinclude.m4 | |
parent | c5569d773b96d1f528d4ab9ce1ed2bf30c45fcbe (diff) | |
download | bluez-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.m4 | 1 |
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" |