Skip to content

Commit 59be6da

Browse files
committed
caused ``` /Users/runner/work/php-src/php-src/ext/hash/blake3/upstream_blake3/c/blake3_dispatch.c:237:26: error: unused variable 'features' [-Werror,-Wunused-variable] const enum cpu_feature features = get_cpu_features(); ``` on 32bit x86-32 linux builds.
1 parent 1f14967 commit 59be6da

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

ext/hash/blake3/patches.diff

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,17 @@ index af6c3dadc7..af3bf17bbe 100644
1919

2020
void blake3_compress_in_place(uint32_t cv[8],
2121
const uint8_t block[BLAKE3_BLOCK_LEN],
22+
23+
diff --git a/ext/hash/blake3/upstream_blake3/c/blake3_dispatch.c b/ext/hash/blake3/upstream_blake3/c/blake3_dispatch.c
24+
index 17c184acf5..d77bd1bb08 100644
25+
--- a/ext/hash/blake3/upstream_blake3/c/blake3_dispatch.c
26+
+++ b/ext/hash/blake3/upstream_blake3/c/blake3_dispatch.c
27+
@@ -235,6 +235,8 @@ void blake3_xof_many(const uint32_t cv[8],
28+
}
29+
#if defined(IS_X86)
30+
const enum cpu_feature features = get_cpu_features();
31+
+// https://github.com/BLAKE3-team/BLAKE3/pull/443
32+
+ MAYBE_UNUSED(features);
33+
#if !defined(_WIN32) && !defined(BLAKE3_NO_AVX512)
34+
if (features & AVX512VL) {
35+
blake3_xof_many_avx512(cv, block, block_len, counter, flags, out, outblocks);

ext/hash/blake3/upstream_blake3/c/blake3_dispatch.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ void blake3_xof_many(const uint32_t cv[8],
235235
}
236236
#if defined(IS_X86)
237237
const enum cpu_feature features = get_cpu_features();
238+
// https://github.com/BLAKE3-team/BLAKE3/pull/443
239+
MAYBE_UNUSED(features);
238240
#if !defined(_WIN32) && !defined(BLAKE3_NO_AVX512)
239241
if (features & AVX512VL) {
240242
blake3_xof_many_avx512(cv, block, block_len, counter, flags, out, outblocks);

0 commit comments

Comments
 (0)