Skip to content

Commit 6163f3f

Browse files
tgummerergitster
authored andcommitted
config.mak.dev: add -Wall, primarily for -Wformat, to help autoconf users
801fa63 ("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 <[email protected]> Helped-by: Jeff King <[email protected]> Helped-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 801fa63 commit 6163f3f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

config.mak.dev

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ifeq ($(filter no-error,$(DEVOPTS)),)
22
CFLAGS += -Werror
33
endif
4+
CFLAGS += -Wall
45
CFLAGS += -Wdeclaration-after-statement
56
CFLAGS += -Wformat-security
67
CFLAGS += -Wno-format-zero-length

0 commit comments

Comments
 (0)