Skip to content

Commit 28fb2aa

Browse files
Claudio Andrésolardiz
authored andcommitted
slow_hash_plug.c: fix "set but not used" warning
Fix: #5672. Signed-off-by: Claudio André <dev@claudioandre.slmail.me>
1 parent 8a72b12 commit 28fb2aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/slow_hash_plug.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ int cn_slow_hash(const void *data, size_t length, char *hash, void *memory)
183183

184184
if (!aes_ctx || oaes_key_import_data(aes_ctx, state.hs.b, AES_KEY_SIZE))
185185
return -1;
186-
const uint8_t *aes_exp_data = oaes_get_exp_data(aes_ctx);
187186
#if MBEDTLS_AESNI_HAVE_CODE == 2
187+
const uint8_t *aes_exp_data = oaes_get_exp_data(aes_ctx);
188188
if (have_aesni)
189189
for (i = 0; i < MEMORY / INIT_SIZE_BYTE; i++) {
190190
for (j = 0; j < INIT_SIZE_BLK; j++)
@@ -255,8 +255,8 @@ int cn_slow_hash(const void *data, size_t length, char *hash, void *memory)
255255
memcpy(text, state.init, INIT_SIZE_BYTE);
256256
if (oaes_key_import_data(aes_ctx, &state.hs.b[32], AES_KEY_SIZE))
257257
return -1;
258-
aes_exp_data = oaes_get_exp_data(aes_ctx);
259258
#if MBEDTLS_AESNI_HAVE_CODE == 2
259+
aes_exp_data = oaes_get_exp_data(aes_ctx);
260260
if (have_aesni)
261261
for (i = 0; i < MEMORY / INIT_SIZE_BYTE; i++) {
262262
for (j = 0; j < INIT_SIZE_BLK; j++) {

0 commit comments

Comments
 (0)