summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-03-26 07:22:25 -0700
committerThiago Macieira <thiago.macieira@intel.com>2024-03-26 16:14:55 -0700
commit58f93994d9ffb08f7fc1fdcb1b9de6df48390124 (patch)
tree9031630cd59c549e578715a5d33d2fcbcdb03f5e
parentfacb6f9477fe2f4a9b133819e7f1a2ea0b59a4e3 (diff)
qHash: fix compilation of SipHash64 on 32-bit: shift >= 32
Amends aadf1d447cd07a961539c6ab607ca65c3297622a because size_t on 32-bit platforms is 32-bit. qhash.cpp:331:15: error: left shift count >= width of type [-Werror=shift-count-overflow] Change-Id: I5f663c2f9f4149af84fefffd17c0567b17f832ce Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/corelib/tools/qhash.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 4e0c07186d..374d448c8a 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -320,13 +320,13 @@ template <int cROUNDS = 2, int dROUNDS = 4> struct SipHash64
uint64_t k0;
uint64_t k1;
- inline SipHash64(size_t fulllen, uint64_t seed, uint64_t seed2);
+ inline SipHash64(uint64_t fulllen, uint64_t seed, uint64_t seed2);
inline void addBlock(const uint8_t *in, size_t inlen);
inline uint64_t finalize(const uint8_t *in, size_t left);
};
template <int cROUNDS, int dROUNDS>
-SipHash64<cROUNDS, dROUNDS>::SipHash64(size_t inlen, uint64_t seed, uint64_t seed2)
+SipHash64<cROUNDS, dROUNDS>::SipHash64(uint64_t inlen, uint64_t seed, uint64_t seed2)
{
b = inlen << 56;
k0 = seed;