* [PATCH] ethdev: fix shadow variable definition
@ 2025-07-03 17:24 Stephen Hemminger
2025-07-03 17:25 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2025-07-03 17:24 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ethdev: fix shadow variable definition
2025-07-03 17:24 [PATCH] ethdev: fix shadow variable definition Stephen Hemminger
@ 2025-07-03 17:25 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2025-07-03 17:25 UTC (permalink / raw)
To: dev
On Thu, 3 Jul 2025 10:24:07 -0700
Stephen Hemminger <stephen@networkplumber.org> wrote:
> 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',
OOPS didn't mean for that bit, it triggers lots of warnings.
See other bugs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-03 17:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-03 17:24 [PATCH] ethdev: fix shadow variable definition Stephen Hemminger
2025-07-03 17:25 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).