diff --git a/src/common/cityhash.cpp b/src/common/cityhash.cpp index 596b943e76..d6f599a29d 100644 --- a/src/common/cityhash.cpp +++ b/src/common/cityhash.cpp @@ -179,7 +179,7 @@ static uint64 HashLen0to16(const char* s, size_t len) { uint8 b = s[len >> 1]; uint8 c = s[len - 1]; uint32 y = static_cast(a) + (static_cast(b) << 8); - uint32 z = len + (static_cast(c) << 2); + uint32 z = static_cast(len) + (static_cast(c) << 2); return ShiftMix(y * k2 ^ z * k0) * k2; } return k2; @@ -290,7 +290,7 @@ static uint128 CityMurmur(const char* s, size_t len, uint128 seed) { uint64 b = Uint128High64(seed); uint64 c = 0; uint64 d = 0; - signed long l = len - 16; + signed long l = static_cast(len) - 16; if (l <= 0) { // len <= 16 a = ShiftMix(a * k1) * k1; c = b * k1 + HashLen0to16(s, len);