ethdev: fix shadow variable definition
PATCH 1/1 ethdev: fix shadow variable definition
The variable 'ret' is defined twice in rte_eth_tx_queue_setup. Can remove one.
Fixes 1bb4a528c41f ("ethdev: fix max Rx packet length")
Signed-off-by Stephen Hemminger <[email protected]>
--- config/meson.build | 1 + lib/ethdev/rte_ethdev.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
config/meson.build +1 -0
@@ -322,6 +322,7 @@ global_cflags = [ '-Wnested-externs', '-Wold-style-definition', '-Wpointer-arith', + '-Wshadow', '-Wsign-compare', '-Wstrict-prototypes', '-Wundef',
lib/ethdev/rte_ethdev.c +0 -1
@@ -2468,7 +2468,6 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,if (local_conf.offloads &RTE_ETH_RX_OFFLOAD_TCP_LRO ) {uint32_t overhead_len;uint32_t max_rx_pktlen; -int ret; overhead_len =eth_dev_get_overhead_len (dev_info.max_rx_pktlen, dev_info.max_mtu);
Signature · 1 line
2.47.2
config/meson.build global_cflags = [ · line 328
Quoted 12 lines · On Thu, 3 Jul 2025 10:24:07 -0700 Stephen Hemminger…
config/meson.build +1
-0@@ -322,6 +322,7 @@ global_cflags = [ '-Wnested-externs', '-Wold-style-definition', '-Wpointer-arith', + '-Wshadow', '-Wsign-compare', '-Wstrict-prototypes', '-Wundef',
OOPS didn't mean for that bit, it triggers lots of warnings. See other bugs