From 84f7ec525051a498c8e14c4a67756be9ddcb704e Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 26 Jun 2025 17:07:16 +0900 Subject: [PATCH] Linux: Fix build error under ARM64 --- src/Crypto/Argon2/src/opt_avx2.c | 7 ++++--- src/Crypto/Argon2/src/opt_sse2.c | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Crypto/Argon2/src/opt_avx2.c b/src/Crypto/Argon2/src/opt_avx2.c index fb62215d..6d326c5a 100644 --- a/src/Crypto/Argon2/src/opt_avx2.c +++ b/src/Crypto/Argon2/src/opt_avx2.c @@ -21,6 +21,8 @@ #include "argon2.h" #include "core.h" +#if defined(__AVX2__) + #include "blake2/blake2.h" #include "blake2/blamka-round-opt.h" @@ -33,7 +35,6 @@ * @param with_xor Whether to XOR into the new block (1) or just overwrite (0) * @pre all block pointers must be valid */ -#if defined(__AVX2__) static void fill_block(__m256i *state, const block *ref_block, block *next_block, int with_xor) { __m256i block_XY[ARGON2_HWORDS_IN_BLOCK]; @@ -194,7 +195,7 @@ void fill_segment_avx2(const argon2_instance_t *instance, #else void fill_segment_avx2(const argon2_instance_t* instance, argon2_position_t position) { - UNREFERENCED_PARAMETER(instance); - UNREFERENCED_PARAMETER(position); + (void)instance; + (void)position; } #endif diff --git a/src/Crypto/Argon2/src/opt_sse2.c b/src/Crypto/Argon2/src/opt_sse2.c index 0881c5da..60393819 100644 --- a/src/Crypto/Argon2/src/opt_sse2.c +++ b/src/Crypto/Argon2/src/opt_sse2.c @@ -20,12 +20,12 @@ #include "argon2.h" #include "core.h" +#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE + #include "blake2/blake2.h" #include "blake2/blamka-round-opt.h" #include "Crypto/config.h" -#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE - /* * Function fills a new memory block and optionally XORs the old block over the new one. * Memory must be initialized. @@ -198,5 +198,7 @@ void fill_segment_sse2(const argon2_instance_t *instance, #else void fill_segment_sse2(const argon2_instance_t* instance, argon2_position_t position) { + (void)instance; + (void)position; } #endif