[DPDK/ethdev Bug 1745] bonding: duplicate shadow local variables
bugzilla at dpdk.org
bugzilla at dpdk.org
Thu Jul 3 19:15:04 CEST 2025
https://bugs.dpdk.org/show_bug.cgi?id=1745
Bug ID: 1745
Summary: bonding: duplicate shadow local variables
Product: DPDK
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: dev at dpdk.org
Reporter: stephen at networkplumber.org
Target Milestone: ---
Building with -Wshadow flags several potential bugs in bonding:
[963/3418] Compiling C object
drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_pmd.c.o
../drivers/net/bonding/rte_eth_bond_pmd.c: In function ‘member_start’:
../drivers/net/bonding/rte_eth_bond_pmd.c:1910:42: warning: declaration of
‘internals’ shadows a previous local [-Wshadow]
1910 | struct bond_dev_private *internals;
| ^~~~~~~~~
../drivers/net/bonding/rte_eth_bond_pmd.c:1828:34: note: shadowed declaration
is here
1828 | struct bond_dev_private *internals =
bonding_eth_dev->data->dev_private;
| ^~~~~~~~~
../drivers/net/bonding/rte_eth_bond_pmd.c: In function
‘bond_ethdev_allmulticast_disable’:
../drivers/net/bonding/rte_eth_bond_pmd.c:2914:34: warning: declaration of
‘port_id’ shadows a previous local [-Wshadow]
2914 | uint16_t port_id =
internals->members[i].port_id;
| ^~~~~~~
../drivers/net/bonding/rte_eth_bond_pmd.c:2903:18: note: shadowed declaration
is here
2903 | uint16_t port_id;
| ^~~~~~~
../drivers/net/bonding/rte_eth_bond_pmd.c: In function ‘bond_ethdev_configure’:
../drivers/net/bonding/rte_eth_bond_pmd.c:4111:26: warning: declaration of ‘i’
shadows a previous local [-Wshadow]
4111 | unsigned i;
| ^
../drivers/net/bonding/rte_eth_bond_pmd.c:3946:18: note: shadowed declaration
is here
3946 | unsigned i, j;
|
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20250703/25367a9c/attachment-0001.htm>
More information about the dev
mailing list