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 <[email protected]> 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() {
