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
This commit is contained in:
@ -59,9 +59,13 @@ endif
|
|||||||
|
|
||||||
# uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
|
# uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
|
||||||
# not worth fixing since newer compilers correctly stop complaining
|
# 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)),)
|
ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
|
||||||
ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
|
ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
|
||||||
DEVELOPER_CFLAGS += -Wno-uninitialized
|
DEVELOPER_CFLAGS += -Wno-uninitialized
|
||||||
|
DEVELOPER_CFLAGS += -Wno-missing-braces
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user