mirror of
https://github.com/BLAKE3-team/BLAKE3
synced 2024-05-13 11:36:09 +02:00
silenc gcc Werror=logical-op
ref https://github.com/BLAKE3-team/BLAKE3/issues/379 /home/travis/build/php/php-src/ext/hash/blake3/upstream_blake3/c/blake3.c: In function ‘compress_subtree_to_parent_node’: /home/travis/build/php/php-src/ext/hash/blake3/upstream_blake3/c/blake3.c:354:22: error: logical ‘and’ of mutually exclusive tests is always false [-Werror=logical-op] 354 | while (num_cvs > 2 && num_cvs <= MAX_SIMD_DEGREE_OR_2) { | ^~ cc1: all warnings being treated as errors make: *** [Makefile:1910: ext/hash/blake3/upstream_blake3/c/blake3.lo] Error 1
This commit is contained in:
parent
a65fcf63ee
commit
d48f0f62bc
|
@ -351,7 +351,11 @@ INLINE void compress_subtree_to_parent_node(
|
|||
// is set on platforms where MAX_SIMD_DEGREE_OR_2 == 2, GCC emits spurious
|
||||
// warnings here. GCC 8.5 is particularly sensitive, so if you're changing
|
||||
// this code, test it against that version.
|
||||
while (num_cvs > 2 && num_cvs <= MAX_SIMD_DEGREE_OR_2) {
|
||||
while (num_cvs > 2
|
||||
#if MAX_SIMD_DEGREE_OR_2 > 2
|
||||
&& num_cvs <= MAX_SIMD_DEGREE_OR_2
|
||||
#endif
|
||||
) {
|
||||
num_cvs =
|
||||
compress_parents_parallel(cv_array, num_cvs, key, flags, out_array);
|
||||
memcpy(cv_array, out_array, num_cvs * BLAKE3_OUT_LEN);
|
||||
|
|
Loading…
Reference in New Issue