xxhash/xxhash-compiler-warning-32-bit.patch

30 lines
1.2 KiB
Diff
Raw Normal View History

From 3a262b04ab139c7ba728b4fa6b3525437a298066 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Sat, 27 Jun 2020 20:05:58 +0200
Subject: [PATCH] Fix compiler warning for 32 bit architectures
In file included from xxhash.h:2065,
from xxhash.c:43:
xxh3.h: In function 'XXH3_len_9to16_128b':
xxh3.h:2278: warning: integer constant is too large for 'long' type
---
xxh3.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xxh3.h b/xxh3.h
index 07cd911..9b547db 100644
--- a/xxh3.h
+++ b/xxh3.h
@@ -2275,7 +2275,7 @@ XXH3_len_9to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64
* On 32-bit, it removes an ADC and delays a dependency between the two
* halves of m128.high64, but it generates an extra mask on 64-bit.
*/
- m128.high64 += (input_hi & 0xFFFFFFFF00000000) + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2);
+ m128.high64 += (input_hi & 0xFFFFFFFF00000000ULL) + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2);
} else {
/*
* 64-bit optimized (albeit more confusing) version.
--
2.26.2