Skip to content

Commit 84f7ec5

Browse files
committed
Linux: Fix build error under ARM64
1 parent 176d1c8 commit 84f7ec5

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/Crypto/Argon2/src/opt_avx2.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include "argon2.h"
2222
#include "core.h"
2323

24+
#if defined(__AVX2__)
25+
2426
#include "blake2/blake2.h"
2527
#include "blake2/blamka-round-opt.h"
2628

@@ -33,7 +35,6 @@
3335
* @param with_xor Whether to XOR into the new block (1) or just overwrite (0)
3436
* @pre all block pointers must be valid
3537
*/
36-
#if defined(__AVX2__)
3738
static void fill_block(__m256i *state, const block *ref_block,
3839
block *next_block, int with_xor) {
3940
__m256i block_XY[ARGON2_HWORDS_IN_BLOCK];
@@ -194,7 +195,7 @@ void fill_segment_avx2(const argon2_instance_t *instance,
194195
#else
195196
void fill_segment_avx2(const argon2_instance_t* instance,
196197
argon2_position_t position) {
197-
UNREFERENCED_PARAMETER(instance);
198-
UNREFERENCED_PARAMETER(position);
198+
(void)instance;
199+
(void)position;
199200
}
200201
#endif

src/Crypto/Argon2/src/opt_sse2.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
#include "argon2.h"
2121
#include "core.h"
2222

23+
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
24+
2325
#include "blake2/blake2.h"
2426
#include "blake2/blamka-round-opt.h"
2527
#include "Crypto/config.h"
2628

27-
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
28-
2929
/*
3030
* Function fills a new memory block and optionally XORs the old block over the new one.
3131
* Memory must be initialized.
@@ -198,5 +198,7 @@ void fill_segment_sse2(const argon2_instance_t *instance,
198198
#else
199199
void fill_segment_sse2(const argon2_instance_t* instance,
200200
argon2_position_t position) {
201+
(void)instance;
202+
(void)position;
201203
}
202204
#endif

0 commit comments

Comments
 (0)