summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-08-08 20:13:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-08-08 20:13:14 (GMT)
commitb9654bee995b1e6a2f106cd57e763854dbf06286 (patch)
tree8e7b3f8ec11e308e7bb51aeedd8c26fdc7c70089
parent1b53bea29aa836932ed6e00383dd6113721c1a73 (diff)
parentb53a5f2416f23bc93f44df95074f9f7f69844a79 (diff)
downloadgit-b9654bee995b1e6a2f106cd57e763854dbf06286.zip
git-b9654bee995b1e6a2f106cd57e763854dbf06286.tar.gz
git-b9654bee995b1e6a2f106cd57e763854dbf06286.tar.bz2
Merge branch 'jk/struct-zero-init-with-older-gcc'
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. * 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