diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-08-26 11:13:10 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-08-26 11:13:11 -0700 |
| commit | 4b2d41b0ad24301827be2bd494fe6cf63f76ad02 (patch) | |
| tree | 1b503d9297207aeef6476c161763781890afbee5 | |
| parent | 69c99b85e7f25b6a04bd28a2198538119bf1e1f0 (diff) | |
| parent | b53a5f2416f23bc93f44df95074f9f7f69844a79 (diff) | |
| download | git-4b2d41b0ad24301827be2bd494fe6cf63f76ad02.tar.xz | |
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.dev | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config.mak.dev b/config.mak.dev index 335efd4620..4fa19d361b 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 |
