diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-08-08 13:13:14 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-08-08 13:13:14 -0700 |
| commit | b9654bee995b1e6a2f106cd57e763854dbf06286 (patch) | |
| tree | 8e7b3f8ec11e308e7bb51aeedd8c26fdc7c70089 | |
| parent | 1b53bea29aa836932ed6e00383dd6113721c1a73 (diff) | |
| parent | b53a5f2416f23bc93f44df95074f9f7f69844a79 (diff) | |
| download | git-b9654bee995b1e6a2f106cd57e763854dbf06286.tar.xz | |
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.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 |
