westerndigitalcorporation / zenfs

ZenFS is a storage backend for RocksDB that enables support for ZNS SSDs and SMR HDDs.
GNU General Public License v2.0
235 stars 86 forks source link

fs: fixed gcc-13 compilation warnings #274

Closed MaisenbacherD closed 1 year ago

MaisenbacherD commented 1 year ago

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
MaisenbacherD commented 1 year ago

Backporting fix from v2.1.4 to master