diff options
| author | Jack O'Connor <[email protected]> | 2020-10-20 12:23:35 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-20 12:23:35 -0400 |
| commit | dae5dc5ef3bc2e366f7747f2bd77c82ba24b6259 (patch) | |
| tree | 7a929f2420e0321aea8c73065b26f31f2f38e9e2 | |
| parent | b9287018935476a26389f22a14a0d2ec763e956c (diff) | |
| parent | c7c4bfafabd7bb95b692395f3c9a5274cea70ed8 (diff) | |
Merge pull request #128 from divinity76/features-unused-fix
fix disabled-optimization -Wall -Werror
| -rw-r--r-- | c/blake3_dispatch.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/c/blake3_dispatch.c b/c/blake3_dispatch.c index a4c0fa9..6518478 100644 --- a/c/blake3_dispatch.c +++ b/c/blake3_dispatch.c @@ -14,6 +14,8 @@ #endif #endif +#define MAYBE_UNUSED(x) (void)((x)) + #if defined(IS_X86) static uint64_t xgetbv() { #if defined(_MSC_VER) @@ -137,6 +139,7 @@ void blake3_compress_in_place(uint32_t cv[8], uint8_t flags) { #if defined(IS_X86) const enum cpu_feature features = get_cpu_features(); + MAYBE_UNUSED(features); #if !defined(BLAKE3_NO_AVX512) if (features & AVX512VL) { blake3_compress_in_place_avx512(cv, block, block_len, counter, flags); @@ -165,6 +168,7 @@ void blake3_compress_xof(const uint32_t cv[8], uint8_t out[64]) { #if defined(IS_X86) const enum cpu_feature features = get_cpu_features(); + MAYBE_UNUSED(features); #if !defined(BLAKE3_NO_AVX512) if (features & AVX512VL) { blake3_compress_xof_avx512(cv, block, block_len, counter, flags, out); @@ -193,6 +197,7 @@ void blake3_hash_many(const uint8_t *const *inputs, size_t num_inputs, uint8_t flags_start, uint8_t flags_end, uint8_t *out) { #if defined(IS_X86) const enum cpu_feature features = get_cpu_features(); + MAYBE_UNUSED(features); #if !defined(BLAKE3_NO_AVX512) if ((features & (AVX512F|AVX512VL)) == (AVX512F|AVX512VL)) { blake3_hash_many_avx512(inputs, num_inputs, blocks, key, counter, @@ -242,6 +247,7 @@ void blake3_hash_many(const uint8_t *const *inputs, size_t num_inputs, size_t blake3_simd_degree(void) { #if defined(IS_X86) const enum cpu_feature features = get_cpu_features(); + MAYBE_UNUSED(features); #if !defined(BLAKE3_NO_AVX512) if ((features & (AVX512F|AVX512VL)) == (AVX512F|AVX512VL)) { return 16; |
