Commit 95fb46db authored by Wez Furlong's avatar Wez Furlong Committed by Facebook Github Bot 7

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
parent 77cf88a7
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment