Skip to content

Commit 4b2d41b

Browse files
committed
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: <[email protected]> * jk/struct-zero-init-with-older-gcc: config.mak.dev: squelch -Wno-missing-braces for older gcc
2 parents 69c99b8 + b53a5f2 commit 4b2d41b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config.mak.dev

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,13 @@ endif
5959

6060
# uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
6161
# 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 }"
6265
ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
6366
ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
6467
DEVELOPER_CFLAGS += -Wno-uninitialized
68+
DEVELOPER_CFLAGS += -Wno-missing-braces
6569
endif
6670
endif
6771

0 commit comments

Comments
 (0)