config.mak.dev: squelch -Wno-missing-braces for older gcc

Versions of gcc prior to 4.9 complain about an initialization like: struct inner { int x; }; struct outer { struct inner; }; struct outer foo = { 0 }; and insist on: struct outer foo = { { 0 } }; Newer compilers handle this just fine. And ignoring the window even on older compilers is fine; the resulting code is correct, but we just get caught by -Werror. Let's relax this for older compilers to make developer lives easier (we don't care much about non-developers on old compilers; they may see a warning, but it won't stop compilation). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Jul 29, 2022 at 15:53 UTC b53a5f2416f23bc93f44df95074f9f7f69844a79
1 file changed +4
config.mak.dev
+4
@@ -59,9 +59,13 @@ endif
59
60 # uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
61 # not worth fixing since newer compilers correctly stop complaining
62 +#
63 +# Likewise, gcc older than 4.9 complains about initializing a
64 +# struct-within-a-struct using just "{ 0 }"
65 ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
66 ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
67 DEVELOPER_CFLAGS += -Wno-uninitialized
68 +DEVELOPER_CFLAGS += -Wno-missing-braces
69 endif
70 endif
71