Skip to content

Commit

Permalink
fs: fixed gcc-13 compilation warnings
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
inikep authored and MaisenbacherD committed Jul 17, 2023
1 parent cea45ab commit 7e919aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fs_zenfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<Status>(s);

/* Write an empty snapshot to make the metadata zone valid */
s = PersistSnapshot(log.get());
Expand Down

0 comments on commit 7e919aa

Please sign in to comment.