[PATCH] ethdev: fix shadow variable definition
Stephen Hemminger
stephen at networkplumber.org
Thu Jul 3 19:24:07 CEST 2025
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 <stephen at networkplumber.org>
---
config/meson.build | 1 +
lib/ethdev/rte_ethdev.c | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/meson.build b/config/meson.build
index f31fef216c..3fc58c53b8 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -322,6 +322,7 @@ global_cflags = [
'-Wnested-externs',
'-Wold-style-definition',
'-Wpointer-arith',
+ '-Wshadow',
'-Wsign-compare',
'-Wstrict-prototypes',
'-Wundef',
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index dd7c00bc94..9934e48415 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -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);
--
2.47.2
More information about the dev
mailing list