Skip to content

Commit

Permalink
slow_hash_plug.c: fix "set but not used" warning
Browse files Browse the repository at this point in the history
Fix: #5672.

Signed-off-by: Claudio André <dev@claudioandre.slmail.me>
  • Loading branch information
claudioandre-br authored and solardiz committed Feb 16, 2025
1 parent 8a72b12 commit 28fb2aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/slow_hash_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ int cn_slow_hash(const void *data, size_t length, char *hash, void *memory)

if (!aes_ctx || oaes_key_import_data(aes_ctx, state.hs.b, AES_KEY_SIZE))
return -1;
const uint8_t *aes_exp_data = oaes_get_exp_data(aes_ctx);
#if MBEDTLS_AESNI_HAVE_CODE == 2
const uint8_t *aes_exp_data = oaes_get_exp_data(aes_ctx);
if (have_aesni)
for (i = 0; i < MEMORY / INIT_SIZE_BYTE; i++) {
for (j = 0; j < INIT_SIZE_BLK; j++)
Expand Down Expand Up @@ -255,8 +255,8 @@ int cn_slow_hash(const void *data, size_t length, char *hash, void *memory)
memcpy(text, state.init, INIT_SIZE_BYTE);
if (oaes_key_import_data(aes_ctx, &state.hs.b[32], AES_KEY_SIZE))
return -1;
aes_exp_data = oaes_get_exp_data(aes_ctx);
#if MBEDTLS_AESNI_HAVE_CODE == 2
aes_exp_data = oaes_get_exp_data(aes_ctx);
if (have_aesni)
for (i = 0; i < MEMORY / INIT_SIZE_BYTE; i++) {
for (j = 0; j < INIT_SIZE_BLK; j++) {
Expand Down

0 comments on commit 28fb2aa

Please sign in to comment.