[dpdk-stable] [PATCH 17.11] mk: disable warnings for packed mem config data structure
Luca Boccassi
bluca at debian.org
Tue Sep 24 20:17:18 CEST 2019
On Mon, 2019-09-02 at 15:42 +0100, Bruce Richardson wrote:
> The rte_mem_config data structure is marked as packed, but we access
> members of that structure via pointers in the code. This leads to
> warnings
> with later gcc compilers e.g. gcc9, so disable those warnings to
> allow
> clean builds.
>
> For older GCC versions, which may not have the flag, there is no need
> to
> filter it out as adding unrecognised warning disable flags to GCC is
> always
> safe [Ref:
> https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> ]
>
> Signed-off-by: Bruce Richardson <
> bruce.richardson at intel.com
> >
> ---
> mk/toolchain/gcc/rte.vars.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mk/toolchain/gcc/rte.vars.mk
> b/mk/toolchain/gcc/rte.vars.mk
> index e7008c052..ec082db99 100644
> --- a/mk/toolchain/gcc/rte.vars.mk
> +++ b/mk/toolchain/gcc/rte.vars.mk
> @@ -81,6 +81,8 @@ ifeq ($(RTE_DEVEL_BUILD),y)
> WERROR_FLAGS += -Werror
> endif
>
> +WERROR_FLAGS += -Wno-address-of-packed-member
> +
> # There are many issues reported for strict alignment architectures
> # which are not necessarily fatal. Report as warnings.
> ifeq ($(CONFIG_RTE_ARCH_STRICT_ALIGN),y)
Acked-by: Luca Boccassi <luca.boccassi at microsoft.com>
Thanks Bruce, applied and pushed.
--
Kind regards,
Luca Boccassi
More information about the stable
mailing list