[Intel-wired-lan] [next PATCH S93 07/11] i40e: remove unnecessary i variable causing -Wshadow warning
Bowers, AndrewX
andrewx.bowers at intel.com
Thu Aug 2 18:32:21 UTC 2018
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Tuesday, July 31, 2018 3:42 AM
> To: Michael, Alice <alice.michael at intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S93 07/11] i40e: remove unnecessary i
> variable causing -Wshadow warning
>
> From: Jacob Keller <jacob.e.keller at intel.com>
>
> Commit c61c8fe1d592 ("i40e: Implement an ethtool private flag to stop LLDP
> in FW") added an extra for-loop which added a shadowing 'i'
> variable as the index.
>
> However, the local variable i already exists, and we already use it as a loop
> index. Additionally, at this point, there is no further use of the variable, so it's
> safe to simply overwrite the variable contents.
>
> This fixes a -Wshadow warning which has started being enabled on some
> distributions
>
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> Reviewed-by: Malek, Patryk <patryk.malek at intel.com>
> Change-ID: I1d2259d27ccab6927efd40fb1853af74678680b8
> ---
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1 -
> 1 file changed, 1 deletion(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
More information about the Intel-wired-lan
mailing list