From 323ebef2dea8ce7c7ccf1447e5ff8d756f1db030 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Mon, 28 Aug 2023 08:45:34 +0000 Subject: [PATCH] drivers: crypto: it8xxx2_evb: fix a shadow variable error Fix a build error: crypto_it8xxx2_sha.c:99:26: warning: declaration of 'i' shadows a previous local [-Wshadow] 99 | for (int i = 0; i < ARRAY_SIZE(sha256_k); i++) { | ^ crypto_it8xxx2_sha.c:88:13: note: shadowed declaration is here 88 | int i; Signed-off-by: Fabio Baltieri --- drivers/crypto/crypto_it8xxx2_sha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/crypto_it8xxx2_sha.c b/drivers/crypto/crypto_it8xxx2_sha.c index 3e8dbee69bc..b144878de8f 100644 --- a/drivers/crypto/crypto_it8xxx2_sha.c +++ b/drivers/crypto/crypto_it8xxx2_sha.c @@ -96,7 +96,7 @@ static void it8xxx2_sha256_init(bool init_k) } /* Initialize array of round constants */ if (init_k) { - for (int i = 0; i < ARRAY_SIZE(sha256_k); i++) { + for (i = 0; i < ARRAY_SIZE(sha256_k); i++) { chip_ctx.k[i] = sha256_k[i]; } }