Skip to contentSkip to conversation

build.sh: Add -Wformat -Werror=format-security into CFLAGS

PATCH New Petr Vorel 1 participant 1 message May 20, 2020

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 build.sh: Add -Wformat -Werror=format-security into CFLAGS

so it's tested in Travis CI
First version, when it was supported was 3.0.4.

---
Hi,

I merged this without review, as it's based on old Cyril's ack [1] First gcc version, where it's supported is gcc 3.

Kind regards,
Petr

[1] http://lists.linux.it/pipermail/ltp/2019-February/010988.html
[2] https://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc/Warning-Options.html

 build.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
build.sh +2 -2
index 50fb527e4..becaf3619 100755
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (c) 2017-2018 Petr Vorel <[email protected]>
+# Copyright (c) 2017-2020 Petr Vorel <[email protected]>
 # Script for travis builds.
 #
 # TODO: Implement comparison of installed files. List of installed files can
@@ -9,7 +9,7 @@
 
 set -e
 
-CFLAGS="${CFLAGS:--Werror=implicit-function-declaration -fno-common}"
+CFLAGS="${CFLAGS:--Wformat -Werror=format-security -Werror=implicit-function-declaration -fno-common}"
 CC="${CC:-gcc}"
 
 DEFAULT_PREFIX="$HOME/ltp-install"
Signature · 1 line
2.26.2