From 7e919aa95d5c586ad382c8a5f83bf7b42a0b0391 Mon Sep 17 00:00:00 2001 From: Przemyslaw Skibinski Date: Tue, 27 Jun 2023 11:38:11 +0200 Subject: [PATCH] fs: fixed gcc-13 compilation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following issue using the same approach as fixes in RocksDB: ``` /data/mysql-server/percona-8.0/storage/rocksdb/rocksdb_plugins/zenfs/fs/fs_zenfs.cc: In member function ‘rocksdb::Status rocksdb::ZenFS::MkFS(std::string, uint32_t)’: /data/mysql-server/percona-8.0/storage/rocksdb/rocksdb_plugins/zenfs/fs/fs_zenfs.cc:1480:32: error: redundant move in return statement [-Werror=redundant-move] 1480 | if (!s.ok()) return std::move(s); | ~~~~~~~~~^~~ /data/mysql-server/percona-8.0/storage/rocksdb/rocksdb_plugins/zenfs/fs/fs_zenfs.cc:1480:32: note: remove ‘std::move’ call ``` Signed-off-by: Przemyslaw Skibinski --- fs/fs_zenfs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fs_zenfs.cc b/fs/fs_zenfs.cc index 7eb5b2bb..7161d921 100644 --- a/fs/fs_zenfs.cc +++ b/fs/fs_zenfs.cc @@ -1477,7 +1477,7 @@ Status ZenFS::MkFS(std::string aux_fs_p, uint32_t finish_threshold) { super.EncodeTo(&super_string); s = log->AddRecord(super_string); - if (!s.ok()) return std::move(s); + if (!s.ok()) return static_cast(s); /* Write an empty snapshot to make the metadata zone valid */ s = PersistSnapshot(log.get());