From: Willy Tarreau Date: Tue, 24 Sep 2019 07:43:34 +0000 (+0200) Subject: BUILD: makefile: work around yet another GCC fantasy (-Wstring-plus-int) X-Git-Tag: v2.1-dev2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c77c2d4f9c413b04f2bd6107f61594deb1abb8de;p=thirdparty%2Fhaproxy.git BUILD: makefile: work around yet another GCC fantasy (-Wstring-plus-int) 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. --- diff --git a/Makefile b/Makefile index 94b0af5f4d..53a80d48ca 100644 --- 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)