Commit 8ab0bf1f by Jamie Madill Committed by Commit Bot

Fix warnings in xxhash.

Again these were showing up in Skia. Bug: angleproject:4046 Change-Id: Ia295ac02b1e1d7bd4186243fc2bf38dffce43c2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877482Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 4bad5355
...@@ -273,7 +273,6 @@ angle_source_set("angle_system_utils") { ...@@ -273,7 +273,6 @@ angle_source_set("angle_system_utils") {
angle_source_set("xxhash") { angle_source_set("xxhash") {
sources = xxhash_sources sources = xxhash_sources
configs -= [ "${angle_root}:extra_warnings" ]
} }
if (angle_has_build) { if (angle_has_build) {
......
...@@ -253,7 +253,7 @@ static U32 XXH_readBE32(const void* ptr) ...@@ -253,7 +253,7 @@ static U32 XXH_readBE32(const void* ptr)
/* ************************************* /* *************************************
* Macros * Macros
***************************************/ ***************************************/
#define XXH_STATIC_ASSERT(c) { enum { XXH_sa = 1/(int)(!!(c)) }; } /* use after variable declarations */ #define XXH_STATIC_ASSERT(c) do { enum { XXH_sa = 1/(int)(!!(c)) }; } while(0) /* use after variable declarations */
XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NUMBER; } XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NUMBER; }
...@@ -296,12 +296,12 @@ XXH32_finalize(U32 h32, const void* ptr, size_t len, ...@@ -296,12 +296,12 @@ XXH32_finalize(U32 h32, const void* ptr, size_t len,
#define PROCESS1 \ #define PROCESS1 \
h32 += (*p++) * PRIME32_5; \ h32 += (*p++) * PRIME32_5; \
h32 = XXH_rotl32(h32, 11) * PRIME32_1 ; h32 = XXH_rotl32(h32, 11) * PRIME32_1
#define PROCESS4 \ #define PROCESS4 \
h32 += XXH_get32bits(p) * PRIME32_3; \ h32 += XXH_get32bits(p) * PRIME32_3; \
p+=4; \ p+=4; \
h32 = XXH_rotl32(h32, 17) * PRIME32_4 ; h32 = XXH_rotl32(h32, 17) * PRIME32_4
switch(len&15) /* or switch(bEnd - p) */ switch(len&15) /* or switch(bEnd - p) */
{ {
...@@ -706,19 +706,19 @@ XXH64_finalize(U64 h64, const void* ptr, size_t len, ...@@ -706,19 +706,19 @@ XXH64_finalize(U64 h64, const void* ptr, size_t len,
#define PROCESS1_64 \ #define PROCESS1_64 \
h64 ^= (*p++) * PRIME64_5; \ h64 ^= (*p++) * PRIME64_5; \
h64 = XXH_rotl64(h64, 11) * PRIME64_1; h64 = XXH_rotl64(h64, 11) * PRIME64_1
#define PROCESS4_64 \ #define PROCESS4_64 \
h64 ^= (U64)(XXH_get32bits(p)) * PRIME64_1; \ h64 ^= (U64)(XXH_get32bits(p)) * PRIME64_1; \
p+=4; \ p+=4; \
h64 = XXH_rotl64(h64, 23) * PRIME64_2 + PRIME64_3; h64 = XXH_rotl64(h64, 23) * PRIME64_2 + PRIME64_3
#define PROCESS8_64 { \ #define PROCESS8_64 do { \
U64 const k1 = XXH64_round(0, XXH_get64bits(p)); \ U64 const k1 = XXH64_round(0, XXH_get64bits(p)); \
p+=8; \ p+=8; \
h64 ^= k1; \ h64 ^= k1; \
h64 = XXH_rotl64(h64,27) * PRIME64_1 + PRIME64_4; \ h64 = XXH_rotl64(h64,27) * PRIME64_1 + PRIME64_4; \
} } while (0)
switch(len&31) { switch(len&31) {
case 24: PROCESS8_64; case 24: PROCESS8_64;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment