From 95fb46dbe9c171dc3d0a549822d84a3c4cdf728b Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 16 Jul 2016 14:13:32 -0700 Subject: [PATCH] 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 --- folly/io/test/CompressionTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.34.1