Skip to content

Commit

Permalink
folly: fixup CompressionTest compilation on macos
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wez authored and Facebook Github Bot 7 committed Jul 16, 2016
1 parent 77cf88a commit 95fb46d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion folly/io/test/CompressionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 95fb46d

Please sign in to comment.