[dpdk-dev] [PATCH] mk: suppress reference of packed members

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Jan 16 16:33:53 CET 2017


Hi,

2017-01-15 20:47, Emmanuel Roullit:
> error: taking address of packed member 'mlock' of class or structure
> 'rte_mem_config' may result in an unaligned pointer value
> [-Werror,-Waddress-of-packed-member]

Is it a compilation error?
Which compiler version?

> --- a/mk/toolchain/clang/rte.vars.mk
> +++ b/mk/toolchain/clang/rte.vars.mk
> @@ -67,7 +67,7 @@ WERROR_FLAGS := -W -Wall -Wstrict-prototypes -Wmissing-prototypes
>  WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith
>  WERROR_FLAGS += -Wnested-externs -Wcast-qual
>  WERROR_FLAGS += -Wformat-nonliteral -Wformat-security
> -WERROR_FLAGS += -Wundef -Wwrite-strings
> +WERROR_FLAGS += -Wundef -Wwrite-strings -Wno-address-of-packed-member

Why removing the warning?
Is there something to fix in the code?




More information about the dev mailing list