kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject incubator-kudu git commit: Fix integer overflow in remote_bootstrap_client-test
Date Mon, 25 Jan 2016 04:05:36 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master c5d748198 -> 0d891c1ba


Fix integer overflow in remote_bootstrap_client-test

Fixes the following Clang warning:

[823/936] Building CXX object src/kudu/tserver/CMakeFiles/remote_bootstrap_client-test.dir/remote_bootstrap_client-test.cc.o
src/kudu/tserver/remote_bootstrap_client-test.cc:149:29: warning: implicit conversion from
'unsigned long' to 'const int' changes value from 18446744073709551615 to -1 [-Wconstant-conversion]
  const int kDataTotalLen = std::numeric_limits<uint64_t>::max();
            ~~~~~~~~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Change-Id: Ia8aadd7ff2072fb45e2c754885a79fada54efd53
Reviewed-on: http://gerrit.cloudera.org:8080/1883
Reviewed-by: Todd Lipcon <todd@apache.org>
Tested-by: Todd Lipcon <todd@apache.org>


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

Branch: refs/heads/master
Commit: 0d891c1baff8d9fdc7041c2b4a65a73853128da5
Parents: c5d7481
Author: Mike Percy <mpercy@apache.org>
Authored: Fri Jan 22 17:44:18 2016 -0800
Committer: Todd Lipcon <todd@apache.org>
Committed: Mon Jan 25 04:05:24 2016 +0000

----------------------------------------------------------------------
 src/kudu/tserver/remote_bootstrap_client-test.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/0d891c1b/src/kudu/tserver/remote_bootstrap_client-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/remote_bootstrap_client-test.cc b/src/kudu/tserver/remote_bootstrap_client-test.cc
index eda5f0c..bccff45 100644
--- a/src/kudu/tserver/remote_bootstrap_client-test.cc
+++ b/src/kudu/tserver/remote_bootstrap_client-test.cc
@@ -146,7 +146,7 @@ TEST_F(RemoteBootstrapClientTest, TestVerifyData) {
   string bad = "This is a known bad! string";
   const int kGoodOffset = 0;
   const int kBadOffset = 1;
-  const int kDataTotalLen = std::numeric_limits<uint64_t>::max(); // Ignored.
+  const int64_t kDataTotalLen = std::numeric_limits<int64_t>::max(); // Ignored.
 
   // Create a known-good PB.
   DataChunkPB valid_chunk;


Mime
View raw message