kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [3/5] kudu git commit: Remove pessimizing std::move() in return statement
Date Thu, 25 Aug 2016 21:51:04 GMT
Remove pessimizing std::move() in return statement

This change fixes this Clang warning:

[334/463] Building CXX object src/kudu/consensus/CMakeFiles/raft_consensus_quorum-test.dir/raft_consensus_quorum-test.cc.o
../../src/kudu/consensus/raft_consensus_quorum-test.cc:534:12: warning: moving a local object
in a return statement prevents copy elision [-Wpessimizing-move]
    return std::move(cmeta);
           ^
../../src/kudu/consensus/raft_consensus_quorum-test.cc:534:12: note: remove std::move call
here
    return std::move(cmeta);
           ^~~~~~~~~~     ~
1 warning generated.

Change-Id: Ida46588398ca5f5982cb86aa03825530565c0923
Reviewed-on: http://gerrit.cloudera.org:8080/4122
Reviewed-by: Todd Lipcon <todd@apache.org>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: a1e6b884a681e33aa4755267cb14602cf97b4b97
Parents: 666ae1e
Author: Mike Percy <mpercy@apache.org>
Authored: Wed Aug 24 22:54:03 2016 -0700
Committer: Mike Percy <mpercy@apache.org>
Committed: Thu Aug 25 07:43:38 2016 +0000

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


http://git-wip-us.apache.org/repos/asf/kudu/blob/a1e6b884/src/kudu/consensus/raft_consensus_quorum-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/raft_consensus_quorum-test.cc b/src/kudu/consensus/raft_consensus_quorum-test.cc
index d32f7fe..ee1a568 100644
--- a/src/kudu/consensus/raft_consensus_quorum-test.cc
+++ b/src/kudu/consensus/raft_consensus_quorum-test.cc
@@ -531,7 +531,7 @@ class RaftConsensusQuorumTest : public KuduTest {
     string peer_uuid = Substitute("peer-$0", peer_index);
     unique_ptr<ConsensusMetadata> cmeta;
     CHECK_OK(ConsensusMetadata::Load(fs_managers_[peer_index], kTestTablet, peer_uuid, &cmeta));
-    return std::move(cmeta);
+    return cmeta;
   }
 
   // Assert that the durable term == term and that the peer that got the vote == voted_for.


Mime
View raw message