]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: eliminate clang build warning in crimson 45049/head
authorchunmei-liu <chunmei.liu@intel.com>
Wed, 16 Feb 2022 05:06:24 +0000 (21:06 -0800)
committerchunmei-liu <chunmei.liu@intel.com>
Wed, 16 Feb 2022 16:20:35 +0000 (08:20 -0800)
Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
src/crimson/os/seastore/lba_manager/btree/lba_btree.cc
src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc
src/crimson/os/seastore/onode_manager/staged-fltree/node_extent_accessor.h
src/crimson/os/seastore/onode_manager/staged-fltree/tree_utils.h
src/crimson/os/seastore/seastore.cc
src/crimson/os/seastore/seastore_types.h
src/crimson/tools/store_nbd/fs_driver.cc
src/crimson/tools/store_nbd/tm_driver.cc

index 9bea6b596ab9631c747b5b603a81ec4b37f31641..6b7078713f303e3d4111b2c7f48ac4b1d1394a71 100644 (file)
@@ -593,6 +593,7 @@ LBABtree::find_insertion_ret LBABtree::find_insertion(
     return iter.prev(
       c
     ).si_then([laddr, &iter](auto p) {
+      boost::ignore_unused(laddr); // avoid clang warning;
       assert(p.leaf.node->get_node_meta().begin <= laddr);
       assert(p.get_key() < laddr);
       // Note, this is specifically allowed to violate the iterator
index 64f72b1592fcf6bf5b6fb101918c327a1e6c9bf6..bf782fdb1f30af59d779094b61e25ec141710f7e 100644 (file)
@@ -226,6 +226,7 @@ OMapInnerNode::list(
              start,
              config.with_reduced_max(result.size())
            ).si_then([&, config](auto &&child_ret) mutable {
+             boost::ignore_unused(config);   // avoid clang warning;
              auto &[child_complete, child_result] = child_ret;
              if (result.size() && child_result.size()) {
                assert(child_result.begin()->first > result.rbegin()->first);
index 379583523d80f4fd65df4cf00a599965d2dbbca8..aae6018074be8bd14c08566aa4352ab1f8124ba0 100644 (file)
@@ -570,6 +570,7 @@ class NodeExtentAccessorT {
         })
       );
     }).si_then([this, c] {
+      boost::ignore_unused(c);  // avoid clang warning;
       assert(!c.t.is_conflicted());
       return *mut;
     });
index ad60f5c6e2d4d34aba678d7dd215efd96f03d272..87fd4584d7dfad459286af397fec8b98486893de 100644 (file)
@@ -309,6 +309,7 @@ class TreeBuilder {
     return tree->insert(
         t, p_kv->key, {p_kv->value.get_payload_size()}
     ).si_then([&t, this, p_kv](auto ret) {
+      boost::ignore_unused(this);  // avoid clang warning;
       auto success = ret.second;
       auto cursor = std::move(ret.first);
       initialize_cursor_from_item(t, p_kv->key, p_kv->value, cursor, success);
@@ -401,6 +402,9 @@ class TreeBuilder {
                    p_kv->value);
     return tree->erase(t, p_kv->key
     ).si_then([&t, this, p_kv] (auto size) {
+      boost::ignore_unused(t);  // avoid clang warning;
+      boost::ignore_unused(this);
+      boost::ignore_unused(p_kv);
       ceph_assert(size == 1);
 #ifndef NDEBUG
       return tree->contains(t, p_kv->key
index 2702e4973097036487249a0a9345fd2c3472acdf..7c72014d0cb4fbb96eeb2520709fdeda992c7924 100644 (file)
@@ -159,7 +159,9 @@ SeaStore::mount_ertr::future<> SeaStore::mount()
       oss << root << "/block." << dtype << "." << std::to_string(id);
       auto sm = std::make_unique<
        segment_manager::block::BlockSegmentManager>(oss.str());
-      return sm->mount().safe_then([this, sm=std::move(sm), magic]() mutable {
+      return sm->mount().safe_then(
+       [this, sm=std::move(sm), magic]() mutable {
+       boost::ignore_unused(magic);  // avoid clang warning;
        assert(sm->get_magic() == magic);
        transaction_manager->add_segment_manager(sm.get());
        secondaries.emplace_back(std::move(sm));
index 596bc552b578d74031222019cab869d06ffd6163..c247acdb6b5f7780f94e22c0920d0a4e841b911e 100644 (file)
@@ -8,6 +8,7 @@
 #include <optional>
 #include <iostream>
 #include <vector>
+#include <boost/core/ignore_unused.hpp>
 
 #include "include/byteorder.h"
 #include "include/denc.h"
index ee0d4f6a05f8454565e2cf5c9765ba750faf168a..f7a33b38510c4f09adbbb4d317ea3b409341f9c0 100644 (file)
@@ -182,7 +182,6 @@ seastar::future<> FSDriver::mkfs()
   return init(    
   ).then([this] {
     assert(fs);
-  }).then([this] {
     return fs->start();
   }).then([this] {
     uuid_d uuid;
index 19cbd56e5e62962d3566e4eab3d7c5beeaac4868..2ccb48b25ff997bbb811ca5a072531061aec8f18 100644 (file)
@@ -36,6 +36,7 @@ seastar::future<> TMDriver::write(
           logger().debug("dec_ref complete");
           return tm->alloc_extent<TestBlock>(t, offset, ptr.length());
         }).si_then([this, offset, &t, &ptr](auto ext) {
+          boost::ignore_unused(offset);  // avoid clang warning;
           assert(ext->get_laddr() == (size_t)offset);
           assert(ext->get_bptr().length() == ptr.length());
           ext->get_bptr().swap(ptr);