You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by al...@apache.org on 2024/03/09 23:20:27 UTC

(kvrocks) branch aleksraiden-fix-warning-build-1 created (now 68f71ade)

This is an automated email from the ASF dual-hosted git repository.

aleksraiden pushed a change to branch aleksraiden-fix-warning-build-1
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


      at 68f71ade Fix build warning

This branch includes the following new commits:

     new 68f71ade Fix build warning

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(kvrocks) 01/01: Fix build warning

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aleksraiden pushed a commit to branch aleksraiden-fix-warning-build-1
in repository https://gitbox.apache.org/repos/asf/kvrocks.git

commit 68f71ade727c73da2caab8ba2578f0d834722d03
Author: Aleks Lozovyuk <al...@gmail.com>
AuthorDate: Sun Mar 10 02:20:22 2024 +0300

    Fix build warning
    
    Fix warning at build like:
    
    ```
    [ 85%] Building CXX object CMakeFiles/kvrocks_objs.dir/src/cluster/slot_import.cc.o
    /Users/runner/work/kvrocks/kvrocks/src/cluster/replication.cc:78:10: warning: local variable 's' will be copied despite being returned by name [-Wreturn-std-move]
      return s;
             ^
    /Users/runner/work/kvrocks/kvrocks/src/cluster/replication.cc:78:10: note: call 'std::move' explicitly to avoid copying
      return s;
             ^
             std::move(s)
    [ 85%] Building CXX object CMakeFiles/kvrocks_objs.dir/src/cluster/slot_migrate.cc.o
    [ 85%] Building CXX object CMakeFiles/kvrocks_objs.dir/src/cluster/sync_migrate_context.cc.o
    ```
---
 src/cluster/replication.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cluster/replication.cc b/src/cluster/replication.cc
index 51e536c7..4df05a47 100644
--- a/src/cluster/replication.cc
+++ b/src/cluster/replication.cc
@@ -75,7 +75,7 @@ Status FeedSlaveThread::Start() {
     conn_ = nullptr;  // prevent connection was freed when failed to start the thread
   }
 
-  return s;
+  return std::move(s);
 }
 
 void FeedSlaveThread::Stop() {