From: Wez Furlong Date: Sat, 16 Jul 2016 21:13:32 +0000 (-0700) Subject: folly: fixup CompressionTest compilation on macos X-Git-Tag: 2016.07.26~41 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=95fb46dbe9c171dc3d0a549822d84a3c4cdf728b;p=folly.git folly: fixup CompressionTest compilation on macos Summary: The compiler on macos is pedantic about the size of the 9UL not matching the size of the type returned by `oneBasedMsbPos`. Cast it to the appropriate size. Reviewed By: meyering Differential Revision: D3576183 fbshipit-source-id: 41e9afc78eed2994e34238da119774e9bf6b7cea --- diff --git a/folly/io/test/CompressionTest.cpp b/folly/io/test/CompressionTest.cpp index 8fe347f1..a1d48b9d 100644 --- a/folly/io/test/CompressionTest.cpp +++ b/folly/io/test/CompressionTest.cpp @@ -213,7 +213,8 @@ void CompressionVarintTest::runSimpleTest(const DataHolder& dh) { auto compressed = codec_->compress(original.get()); auto breakPoint = 1UL + - Random::rand64(std::max(9UL, oneBasedMsbPos(uncompressedLength_)) / 9UL); + Random::rand64( + std::max(uint64_t(9), oneBasedMsbPos(uncompressedLength_)) / 9UL); auto tinyBuf = IOBuf::copyBuffer(compressed->data(), std::min(compressed->length(), breakPoint)); compressed->trimStart(breakPoint);