Add -Wformat and -Werror=format-security compiler flags
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sat, 12 Jul 2014 20:11:56 +0000 (22:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 12 Jul 2014 21:15:23 +0000 (23:15 +0200)
These are part of the hardening flags used by Debian.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
configure

index e39ecb9..a89639d 100755 (executable)
--- a/configure
+++ b/configure
@@ -5067,9 +5067,11 @@ elif enabled ccc; then
 elif enabled gcc; then
     check_optflags -fno-tree-vectorize
     check_cflags -Werror=implicit-function-declaration
+    check_cflags -Werror=format-security
     check_cflags -Werror=missing-prototypes
     check_cflags -Werror=return-type
     check_cflags -Werror=vla
+    check_cflags -Wformat
     enabled extra_warnings || check_disable_warning -Wno-maybe-uninitialized
 elif enabled llvm_gcc; then
     check_cflags -mllvm -stack-alignment=16