From: Mohamed Amin JABRI Date: Wed, 27 Sep 2017 17:38:18 +0000 (-0700) Subject: Fix unittest compile error on futures/test/RetryingTest.cpp. X-Git-Tag: v2017.10.02.00~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b83cd9e34b299b41c110f539ffa667653c82dafe;p=folly.git Fix unittest compile error on futures/test/RetryingTest.cpp. Summary: On MacOS compiling unittests with "make chek" shows the following compile error: ``` ../futures/test/RetryingTest.cpp:168:26: error: no matching function for call to 'min' newMemLimit.rlim_cur = std::min(1UL << 30, oldMemLimit.rlim_max); ``` Closes https://github.com/facebook/folly/pull/680 Reviewed By: elsteveogrande Differential Revision: D5921433 Pulled By: yfeldblum fbshipit-source-id: 236d8336f852750a983c2e268db8811d1a4ed9ee --- diff --git a/folly/futures/test/RetryingTest.cpp b/folly/futures/test/RetryingTest.cpp index 59eb3e01..61505c6a 100644 --- a/folly/futures/test/RetryingTest.cpp +++ b/folly/futures/test/RetryingTest.cpp @@ -165,7 +165,8 @@ TEST(RetryingTest, large_retries) { PCHECK(getrlimit(RLIMIT_AS, &oldMemLimit) == 0); rlimit newMemLimit; - newMemLimit.rlim_cur = std::min(1UL << 30, oldMemLimit.rlim_max); + newMemLimit.rlim_cur = + std::min(static_cast(1UL << 30), oldMemLimit.rlim_max); newMemLimit.rlim_max = oldMemLimit.rlim_max; if (!folly::kIsSanitizeAddress) { // ASAN reserves outside of the rlimit PCHECK(setrlimit(RLIMIT_AS, &newMemLimit) == 0);