[RFC PATCH v2 26/33] app/test-eventdev: fix build with shadow warnings enabled

Bruce Richardson bruce.richardson at intel.com
Fri Nov 7 16:50:22 CET 2025


Rename or remove shadowed variables to give a clean build with -Wshadow.

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 app/test-eventdev/evt_main.c          | 6 +++---
 app/test-eventdev/test_atomic_queue.c | 6 +++---
 app/test-eventdev/test_perf_common.c  | 4 +---
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/app/test-eventdev/evt_main.c b/app/test-eventdev/evt_main.c
index 03114020f1..6f71c0a73d 100644
--- a/app/test-eventdev/evt_main.c
+++ b/app/test-eventdev/evt_main.c
@@ -30,11 +30,11 @@ signal_handler(int signum)
 }
 
 static inline void
-evt_options_dump_all(struct evt_test *test, struct evt_options *opts)
+evt_options_dump_all(struct evt_test *t, struct evt_options *opts)
 {
 	evt_options_dump(opts);
-	if (test->ops.opt_dump)
-		test->ops.opt_dump(opts);
+	if (t->ops.opt_dump)
+		t->ops.opt_dump(opts);
 }
 
 int
diff --git a/app/test-eventdev/test_atomic_queue.c b/app/test-eventdev/test_atomic_queue.c
index 8ce0849664..2b7bbeb370 100644
--- a/app/test-eventdev/test_atomic_queue.c
+++ b/app/test-eventdev/test_atomic_queue.c
@@ -34,7 +34,7 @@ static inline void
 atomic_queue_process_stage_1(struct test_order *const t,
 		struct rte_event *const ev,
 		uint32_t nb_flows,
-		rte_spinlock_t *atomic_locks,
+		rte_spinlock_t *atomic_lks,
 		uint32_t *const expected_flow_seq,
 		RTE_ATOMIC(uint64_t) * const outstand_pkts,
 		uint32_t port)
@@ -42,7 +42,7 @@ atomic_queue_process_stage_1(struct test_order *const t,
 	const uint32_t flow = *order_mbuf_flow_id(t, ev->mbuf);
 	const uint32_t seq = *order_mbuf_seqn(t, ev->mbuf);
 
-	atomic_lock_verify(atomic_locks, 1, flow, nb_flows, t, port);
+	atomic_lock_verify(atomic_lks, 1, flow, nb_flows, t, port);
 
 	/* compare the seqn against expected value */
 	if (seq != expected_flow_seq[flow]) {
@@ -58,7 +58,7 @@ atomic_queue_process_stage_1(struct test_order *const t,
 
 	ev->op = RTE_EVENT_OP_RELEASE;
 
-	atomic_spinlock_unlock(atomic_locks, 1, flow, nb_flows);
+	atomic_spinlock_unlock(atomic_lks, 1, flow, nb_flows);
 }
 
 static int
diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index 6b2ce61832..8201f2351a 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -2131,12 +2131,10 @@ perf_cryptodev_destroy(struct evt_test *test, struct evt_options *opt)
 		void *sess;
 		struct prod_data *p = &t->prod[port];
 		uint32_t flow_id;
-		uint8_t cdev_id;
 
 		for (flow_id = 0; flow_id < t->nb_flows; flow_id++) {
 			sess = p->ca.crypto_sess[flow_id];
-			cdev_id = p->ca.cdev_id;
-			rte_cryptodev_sym_session_free(cdev_id, sess);
+			rte_cryptodev_sym_session_free(p->ca.cdev_id, sess);
 		}
 
 		rte_event_crypto_adapter_queue_pair_del(
-- 
2.48.1



More information about the dev mailing list