From 00d48810a82c681e52159ccfe3669a4122ba4830 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 31 Aug 2016 23:09:00 +0300 Subject: [PATCH] Makefile: add -Wformat-security to CFLAGS Apparently when travis checks patches, it compiles code with -Wformat-security (most probably because the distro/gcc it uses has it on by default), but on my system (Fedora 24/gcc 6.1.1) this flag is not on. As a result, code compiles fine for me but travis reports an error. Add -Wformat-security to default CFLAGS. It helps to catch problems like using printf(str) instead of printf("%s", str). Signed-off-by: Kir Kolyshkin Signed-off-by: Pavel Emelyanov --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 52cbd6a67..32c3ddc53 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,7 @@ DEFINES += -D_GNU_SOURCE CFLAGS += $(USERCFLAGS) -WARNINGS := -Wall +WARNINGS := -Wall -Wformat-security CFLAGS-GCOV := --coverage -fno-exceptions -fno-inline export CFLAGS-GCOV