X-Git-Url: https://gerrit.fd.io/r/gitweb?p=deb_dpdk.git;a=blobdiff_plain;f=mk%2Ftoolchain%2Fgcc%2Frte.vars.mk;h=e7008c052e7d15171f8901c3d73c608157fc9f3e;hp=3b907e2019c6c5b26eaaa5d5f9eb8d4ec3bbd0ff;hb=6e7cbd63706f3435b9d9a2057a37db1da01db9a7;hpb=e4df4d55df003957fc5afd7440e3d3192d7ce218 diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index 3b907e20..e7008c05 100644 --- a/mk/toolchain/gcc/rte.vars.mk +++ b/mk/toolchain/gcc/rte.vars.mk @@ -99,6 +99,15 @@ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1) WERROR_FLAGS += -Wno-uninitialized endif +HOST_WERROR_FLAGS := $(WERROR_FLAGS) + +ifeq ($(shell test $(HOST_GCC_VERSION) -gt 70 && echo 1), 1) +# Tell GCC only to error for switch fallthroughs without a suitable comment +HOST_WERROR_FLAGS += -Wimplicit-fallthrough=2 +# Ignore errors for snprintf truncation +HOST_WERROR_FLAGS += -Wno-format-truncation +endif + ifeq ($(shell test $(GCC_VERSION) -gt 70 && echo 1), 1) # Tell GCC only to error for switch fallthroughs without a suitable comment WERROR_FLAGS += -Wimplicit-fallthrough=2