[dpdk-dev] [PATCH v2] raw/ioat: fix parameter shadow warning

Bruce Richardson bruce.richardson at intel.com
Mon May 10 16:48:27 CEST 2021


On Mon, May 10, 2021 at 04:06:00PM +0200, David Marchand wrote:
> On Mon, May 10, 2021 at 2:55 PM Kevin Laatz <kevin.laatz at intel.com> wrote:
> >
> > In the function __idxd_completed_ops() we have a parameter shadow warning
> > due to a local variable having the same name as one of the function
> > parameters. This issue is fixed by simply renaming the local variable.
> >
> > This warning was discovered during an OVS build with DPDK 21.05-rc2. The
> > OVS build passes the -Wshadow flag by default, allowing the warning to be
> > seen.
> 
> A bit confusing.
> -Wshadow only affects OVS code and there is no code calling this in
> the OVS master branch.
> 
> I did not see this issue while updating my dpdk-latest OVS branch and
> running builds in GHA.
> So I guess Sunil caught it with his patch:
> https://patchwork.ozlabs.org/project/openvswitch/patch/20201023094845.35652-2-sunil.pai.g@intel.com/
>
Yes, it was caught by Sunil in the course of his work.

Ideally, I think -Wshadow would be a good flag to add to our DPDK builds,
but it causes quite a number of errors right now to do so. Hopefully in a
future release.

/Bruce


More information about the dev mailing list