summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-08-26 18:13:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-08-26 18:13:11 (GMT)
commit4b2d41b0ad24301827be2bd494fe6cf63f76ad02 (patch)
tree1b503d9297207aeef6476c161763781890afbee5
parent69c99b85e7f25b6a04bd28a2198538119bf1e1f0 (diff)
parentb53a5f2416f23bc93f44df95074f9f7f69844a79 (diff)
downloadgit-4b2d41b0ad24301827be2bd494fe6cf63f76ad02.zip
git-4b2d41b0ad24301827be2bd494fe6cf63f76ad02.tar.gz
git-4b2d41b0ad24301827be2bd494fe6cf63f76ad02.tar.bz2
Merge branch 'jk/struct-zero-init-with-older-gcc' into maint
Older gcc with -Wall complains about the universal zero initializer "struct s = { 0 };" idiom, which makes developers' lives inconvenient (as -Werror is enabled by DEVELOPER=YesPlease). The build procedure has been tweaked to help these compilers. source: <YuQ60ZUPBHAVETD7@coredump.intra.peff.net> * jk/struct-zero-init-with-older-gcc: config.mak.dev: squelch -Wno-missing-braces for older gcc
-rw-r--r--config.mak.dev4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.mak.dev b/config.mak.dev
index 335efd4..4fa19d3 100644
--- a/config.mak.dev
+++ b/config.mak.dev
@@ -59,9 +59,13 @@ endif
# uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
# not worth fixing since newer compilers correctly stop complaining
+#
+# Likewise, gcc older than 4.9 complains about initializing a
+# struct-within-a-struct using just "{ 0 }"
ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
DEVELOPER_CFLAGS += -Wno-uninitialized
+DEVELOPER_CFLAGS += -Wno-missing-braces
endif
endif