[v3,23/31] app/test-crypto-perf: rename local vars to fix shadowing

Message ID 20251201114448.1441377-24-bruce.richardson@intel.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series build DPDK with Wshadow flag |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Dec. 1, 2025, 11:44 a.m. UTC
The global variable iv_offset was shadowed by a local var. Rename the
local variable to a shorter form to solve the issue.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
  

Patch

diff --git a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
index 07a842f40a..5e3153b9dd 100644
--- a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
+++ b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
@@ -111,15 +111,13 @@  cperf_pmd_cyclecount_test_constructor(struct rte_mempool *sess_mp,
 	ctx->test_vector = test_vector;
 
 	/* IV goes at the end of the crypto operation */
-	uint16_t iv_offset = sizeof(struct rte_crypto_op) +
-			sizeof(struct rte_crypto_sym_op);
+	uint16_t iv_ofs = sizeof(struct rte_crypto_op) + sizeof(struct rte_crypto_sym_op);
 
 	if (*sess != NULL) {
 		ctx->sess = *sess;
 		ctx->sess_owner = false;
 	} else {
-		ctx->sess = op_fns->sess_create(sess_mp, dev_id, options, test_vector,
-			iv_offset);
+		ctx->sess = op_fns->sess_create(sess_mp, dev_id, options, test_vector, iv_ofs);
 		if (ctx->sess == NULL)
 			goto err;
 		*sess = ctx->sess;