From 6e15e2bd261026b8df0e2da0ed5bc346abb72714 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 9 Jul 2016 11:58:36 +0900 Subject: [PATCH] src: Cast to uint64_t explicitly --- src/cache_digest.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cache_digest.cc b/src/cache_digest.cc index 750d17eb..5ca763ee 100644 --- a/src/cache_digest.cc +++ b/src/cache_digest.cc @@ -76,8 +76,9 @@ int compute_hash_values(std::vector &hash_values, (static_cast(md[25]) << 48) + (static_cast(md[26]) << 40) + (static_cast(md[27]) << 32) + - (static_cast(md[28]) << 24) + (md[29] << 16) + (md[30] << 8) + - md[31]; + (static_cast(md[28]) << 24) + + (static_cast(md[29]) << 16) + + (static_cast(md[30]) << 8) + static_cast(md[31]); v &= mask; *p++ = v; @@ -249,8 +250,9 @@ int cache_digest_hash(uint64_t &key, size_t nbits, const StringRef &s) { (static_cast(md[25]) << 48) + (static_cast(md[26]) << 40) + (static_cast(md[27]) << 32) + - (static_cast(md[28]) << 24) + (md[29] << 16) + (md[30] << 8) + - md[31]; + (static_cast(md[28]) << 24) + + (static_cast(md[29]) << 16) + + (static_cast(md[30]) << 8) + static_cast(md[31]); key &= mask;