]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os: mark unused variable [[maybe_unused]]
authorKefu Chai <kchai@redhat.com>
Mon, 8 Feb 2021 13:54:46 +0000 (21:54 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 8 Feb 2021 14:09:46 +0000 (22:09 +0800)
to silence warning like

key_layout.h:516:10: warning: unused variable 'nspace_masked'
[-Wunused-variable]
    auto nspace_masked = string_view_masked_t::decode(nspace, delta);
         ^

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/os/seastore/onode_manager/staged-fltree/stages/key_layout.h

index cc1f546c1a96626621251ed2af108644e0666fa5..1ccc78a9fe7a4c3c971e4e118259da19ab841a3f 100644 (file)
@@ -513,11 +513,11 @@ class key_hobj_t {
     crush_hash_t crush;
     ceph::decode(crush, delta);
     std::string nspace;
-    auto nspace_masked = string_view_masked_t::decode(nspace, delta);
+    [[maybe_unused]] auto nspace_masked = string_view_masked_t::decode(nspace, delta);
     // TODO(cross-node string dedup)
     assert(nspace_masked.get_type() == string_view_masked_t::Type::STR);
     std::string oid;
-    auto oid_masked = string_view_masked_t::decode(oid, delta);
+    [[maybe_unused]] auto oid_masked = string_view_masked_t::decode(oid, delta);
     // TODO(cross-node string dedup)
     assert(oid_masked.get_type() == string_view_masked_t::Type::STR);
     snap_t snap;