From: Haocheng Zhang Date: Fri, 24 Jun 2016 19:34:59 +0000 (-0700) Subject: fix bug for negative shift value X-Git-Tag: 2016.07.26~116 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7815372b49e1f22900aec37532825028890644a7;p=folly.git fix bug for negative shift value Reviewed By: luciang Differential Revision: D3407128 fbshipit-source-id: 2c00387d6e068f9e052f539198ae2f985d265c74 --- diff --git a/folly/Hash.h b/folly/Hash.h index dd61fb76..b0ae03bb 100644 --- a/folly/Hash.h +++ b/folly/Hash.h @@ -281,7 +281,7 @@ inline uint64_t fnv64(const std::string& str, inline uint32_t hsieh_hash32_buf(const void* buf, size_t len) { // forcing signed char, since other platforms can use unsigned - const signed char* s = reinterpret_cast(buf); + const unsigned char* s = reinterpret_cast(buf); uint32_t hash = static_cast(len); uint32_t tmp; size_t rem;