kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danburk...@apache.org
Subject kudu git commit: [util] fixed env_util-test.cc compilation on OS X
Date Sat, 11 Mar 2017 01:13:31 GMT
Repository: kudu
Updated Branches:
  refs/heads/branch-1.3.x dfd9b491f -> d784f04d8


[util] fixed env_util-test.cc compilation on OS X

The prior version failed to compile on OS X with clang version 3.9.0
(branches/release_39 277311) with error messaged containing:

/opt/local/libexec/llvm-3.9/bin/../include/c++/v1/algorithm:2643:1:
note:
  candidate template ignored: deduced conflicting types for parameter
  '_Tp' ('long' vs. 'long long')
max(const _Tp& __a, const _Tp& __b)
^
/opt/local/libexec/llvm-3.9/bin/../include/c++/v1/algorithm:2653:1:
note:
  candidate template ignored: could not match
    'initializer_list<type-parameter-0-0>' against 'long'
max(initializer_list<_Tp> __t, _Compare __comp)
^

Change-Id: I0ce139c9896a969d51bfcaeabdf6133287c3a897
Reviewed-on: http://gerrit.cloudera.org:8080/6282
Reviewed-by: Mike Percy <mpercy@apache.org>
Tested-by: Kudu Jenkins
(cherry picked from commit 97831eadf1511449daebe25d3431472b55e3c21c)
Reviewed-on: http://gerrit.cloudera.org:8080/6351
Reviewed-by: Jean-Daniel Cryans <jdcryans@apache.org>
Reviewed-by: Alexey Serbin <aserbin@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/d784f04d
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/d784f04d
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/d784f04d

Branch: refs/heads/branch-1.3.x
Commit: d784f04d86a09d4f4db7331df4d082a5dffeb09c
Parents: dfd9b49
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Mon Mar 6 19:43:22 2017 -0800
Committer: Dan Burkert <danburkert@apache.org>
Committed: Sat Mar 11 01:08:15 2017 +0000

----------------------------------------------------------------------
 src/kudu/util/env_util-test.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/d784f04d/src/kudu/util/env_util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/env_util-test.cc b/src/kudu/util/env_util-test.cc
index 715f03b..d0a7ae3 100644
--- a/src/kudu/util/env_util-test.cc
+++ b/src/kudu/util/env_util-test.cc
@@ -19,6 +19,7 @@
 #include <sys/time.h>
 #include <unistd.h>
 
+#include <algorithm>
 #include <memory>
 #include <unordered_set>
 
@@ -67,7 +68,7 @@ TEST_F(EnvUtilTest, TestDiskSpaceCheck) {
     ASSERT_OK(env_->GetSpaceInfo(test_dir_, &space_info));
     // Try for 1 less byte than 1% free. This request should be rejected.
     int64_t target_free_bytes = (space_info.capacity_bytes / 100) - 1;
-    int64_t bytes_to_request = std::max(0L, space_info.free_bytes - target_free_bytes);
+    int64_t bytes_to_request = std::max<int64_t>(0, space_info.free_bytes - target_free_bytes);
     NO_FATALS(AssertNoSpace(VerifySufficientDiskSpace(env_, test_dir_, bytes_to_request,
                                                       kRequestOnePercentReservation)));
   }));


Mime
View raw message