aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-03-01 21:45:51 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-03-01 21:45:51 +0000
commitb4d023503b40b45fd11835f1697a17e23f958af3 (patch)
tree98b132dde634058e1e81167284a40a15acb4724f
parent680458275fd6c05ce3683d86483eff1254d0df80 (diff)
Fix two warnings in this code that I missed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151839 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/Hashing.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/ADT/Hashing.h b/include/llvm/ADT/Hashing.h
index ccf352cb52..e5969a3c05 100644
--- a/include/llvm/ADT/Hashing.h
+++ b/include/llvm/ADT/Hashing.h
@@ -219,7 +219,7 @@ inline uint64_t hash_33to64_bytes(const char *s, size_t len, uint64_t seed) {
uint64_t wf = a + z;
uint64_t ws = b + rotate(a, 31) + c;
uint64_t r = shift_mix((vf + ws) * k2 + (wf + vs) * k0);
- return shift_mix(seed ^ (r * k0) + vs) * k2;
+ return shift_mix((seed ^ (r * k0)) + vs) * k2;
}
inline uint64_t hash_short(const char *s, size_t length, uint64_t seed) {
@@ -325,8 +325,9 @@ inline size_t get_execution_seed() {
//
// However, if there is a fixed seed override set the first time this is
// called, return that instead of the per-execution seed.
+ const uint64_t seed_prime = 0xff51afd7ed558ccdULL;
static size_t seed = fixed_seed_override ? fixed_seed_override
- : 0xff51afd7ed558ccdULL;
+ : static_cast<size_t>(seed_prime);
return seed;
}