From: Thomas Monjalon <thomas@monjalon.net>
To: Amit Prakash Shukla <amitprakashs@marvell.com>
Cc: Ruifeng Wang <ruifeng.wang@arm.com>,
dev@dpdk.org, jerinj@marvell.com, stable@dpdk.org,
gakhil@marvell.com, stephen@networkplumber.org,
Rahul Bhansali <rbhansali@marvell.com>
Subject: Re: [PATCH v2] examples: compilation fix for GCC-12
Date: Thu, 06 Oct 2022 11:27:39 +0200 [thread overview]
Message-ID: <1737703.VLH7GnMWUR@thomas> (raw)
In-Reply-To: <20220902074337.3129786-1-amitprakashs@marvell.com>
02/09/2022 09:43, Amit Prakash Shukla:
> GCC-12 warns when a pointer of type union points to an array of same
> defined size, as union internally gets paded with pad bytes.
>
> ../examples/common/neon/port_group.h:42:21: error: array subscript
> 'union <anonymous>[0]' is partly outside array bounds of
> 'uint16_t[5]' {aka 'short unsigned int[5]'}
> [-Werror=array-bounds]
> 42 | pnum->u64 = gptbl[v].pnum;
> | ^~
> ../examples/common/neon/port_group.h:21:23: note: object 'pn' of
> size [0, 10]
> 21 | port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1
> | ~~~~~~~~~^~~~~~~~~~~~~~~
> ../examples/common/neon/port_group.h:43:21: error: array subscript
> 'union <anonymous>[0]' is partly outside array bounds of
> 'uint16_t[5]' {aka 'short unsigned int[5]'} [-Werror=array-bounds]
> 43 | pnum->u16[FWDSTEP] = 1;
> | ^~
>
> Fixes: bdfc3816fbfc ("examples: common packet group functionality")
Should be:
Fixes: 732115ce38c6 ("examples/l3fwd: move packet group function in common")
> Cc: stable@dpdk.org
>
> Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
Applied, thanks.
prev parent reply other threads:[~2022-10-06 9:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 8:23 [PATCH] " Amit Prakash Shukla
2022-09-01 15:24 ` Stephen Hemminger
2022-09-02 7:19 ` [EXT] " Amit Prakash Shukla
2022-09-02 7:43 ` [PATCH v2] " Amit Prakash Shukla
2022-10-06 6:31 ` Amit Prakash Shukla
2022-10-06 9:21 ` Thomas Monjalon
2022-10-06 9:27 ` Thomas Monjalon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1737703.VLH7GnMWUR@thomas \
--to=thomas@monjalon.net \
--cc=amitprakashs@marvell.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=jerinj@marvell.com \
--cc=rbhansali@marvell.com \
--cc=ruifeng.wang@arm.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).