Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2018-10-12 21:40:37 +0300
committerJunio C Hamano <gitster@pobox.com>2019-01-07 20:02:08 +0300
commit6163f3f1a4288a6a17d2e3cdee4391b25ef09edd (patch)
tree614debf157f0896acfdecd97cb2b7643f50994b6 /config.mak.dev
parent801fa63a90e3619c91e0bb3e7a28140e6d31a097 (diff)
config.mak.dev: add -Wall, primarily for -Wformat, to help autoconf users
801fa63a90 ("config.mak.dev: add -Wformat-security", 2018-09-08) added the "-Wformat-security" to the flags set in config.mak.dev. In the gcc man page this is documented as: If -Wformat is specified, also warn about uses of format functions that represent possible security problems. [...] The commit did however not add the "-Wformat" flag, but instead relied on the fact that "-Wall" is set in the Makefile by default and that "-Wformat" is part of "-Wall". Unfortunately, those who use config.mak.autogen generated with the autoconf to configure toolchain do *not* get "-Wall" in their CFLAGS and the added -Wformat-security had no effect. Worse yet, newer versions of gcc (gcc 8.2.1 in this particular case) warn about the lack of "-Wformat" and thus compilation fails only with this option set. We could fix it by adding "-Wformat", but in general we do want all checks included in "-Wall", so let's add it to config.mak.dev to cover more cases. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Helped-by: Jeff King <peff@peff.net> Helped-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.mak.dev')
-rw-r--r--config.mak.dev1
1 files changed, 1 insertions, 0 deletions
diff --git a/config.mak.dev b/config.mak.dev
index bfbd3df4e8..74337f1f92 100644
--- a/config.mak.dev
+++ b/config.mak.dev
@@ -1,6 +1,7 @@
ifeq ($(filter no-error,$(DEVOPTS)),)
CFLAGS += -Werror
endif
+CFLAGS += -Wall
CFLAGS += -Wdeclaration-after-statement
CFLAGS += -Wformat-security
CFLAGS += -Wno-format-zero-length