patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 17.11] mk: disable warnings for packed mem config data structure
@ 2019-09-02 14:42 Bruce Richardson
  2019-09-24 18:17 ` Luca Boccassi
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Richardson @ 2019-09-02 14:42 UTC (permalink / raw)
  To: stable; +Cc: xuemingx.zhang, Bruce Richardson

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@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)
-- 
2.21.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH 17.11] mk: disable warnings for packed mem config data structure
  2019-09-02 14:42 [dpdk-stable] [PATCH 17.11] mk: disable warnings for packed mem config data structure Bruce Richardson
@ 2019-09-24 18:17 ` Luca Boccassi
  0 siblings, 0 replies; 2+ messages in thread
From: Luca Boccassi @ 2019-09-24 18:17 UTC (permalink / raw)
  To: Bruce Richardson, stable; +Cc: xuemingx.zhang

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@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@microsoft.com>

Thanks Bruce, applied and pushed.

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-24 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02 14:42 [dpdk-stable] [PATCH 17.11] mk: disable warnings for packed mem config data structure Bruce Richardson
2019-09-24 18:17 ` Luca Boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).