]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: work around yet another GCC fantasy (-Wstring-plus-int)
authorWilly Tarreau <w@1wt.eu>
Tue, 24 Sep 2019 07:43:34 +0000 (09:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 24 Sep 2019 07:43:34 +0000 (09:43 +0200)
According to issue #294 some gcc versions suspect that developers are
having trouble dealing with string offsets and now emit another new
childish warning when mapping indexes to characters. Instead of annoying
developers each time it happens and ask them to modify their valid code,
let's just get rid of this absurd warning.

Makefile

index 94b0af5f4de65c213b7d6dc4abbc77b570e5fd29..53a80d48ca9a8b305c39fda79faf579cc482f910 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -194,6 +194,7 @@ SPEC_CFLAGS += $(call cc-nowarn,missing-field-initializers)
 SPEC_CFLAGS += $(call cc-nowarn,implicit-fallthrough)
 SPEC_CFLAGS += $(call cc-nowarn,stringop-overflow)
 SPEC_CFLAGS += $(call cc-nowarn,cast-function-type)
+SPEC_CFLAGS += $(call cc-nowarn,string-plus-int)
 SPEC_CFLAGS += $(call cc-opt,-Wtype-limits)
 SPEC_CFLAGS += $(call cc-opt,-Wshift-negative-value)
 SPEC_CFLAGS += $(call cc-opt,-Wshift-overflow=2)