bonding: duplicate shadow local variables
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: [email protected]
Reporter: [email protected]
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;
|Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.