Skip to content

Commit fa31c2e

Browse files
Merge pull request ceph#65714 from batrick/objstore-warning
os: resolve unused variable warning
2 parents 18ea9f3 + 6c7b0dd commit fa31c2e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/os/ObjectStore.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,20 @@ int ObjectStore::probe_block_device_fsid(
7070
const string& path,
7171
uuid_d *fsid)
7272
{
73-
int r;
74-
7573
#if defined(WITH_BLUESTORE)
7674
// first try bluestore -- it has a crc on its header and will fail
7775
// reliably.
78-
r = BlueStore::get_block_device_fsid(cct, path, fsid);
76+
int r = BlueStore::get_block_device_fsid(cct, path, fsid);
7977
if (r == 0) {
8078
lgeneric_dout(cct, 0) << __func__ << " " << path << " is bluestore, "
8179
<< *fsid << dendl;
8280
return r;
81+
} else {
82+
return -EINVAL;
8383
}
84-
#endif
85-
84+
#else
8685
return -EINVAL;
86+
#endif
8787
}
8888

8989
int ObjectStore::write_meta(const std::string& key,

0 commit comments

Comments
 (0)