From cec783344ec8accd365111e61c823b7d340a4918 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 2 Mar 2021 19:46:01 +0800 Subject: [PATCH] crimson/os: mark unused variable with [[maybe_unused]] `MAX_FLAT_BLOCK_SIZE` is only used in Debug builds. Signed-off-by: Kefu Chai --- .../os/seastore/collection_manager/flat_collection_manager.cc | 2 +- .../os/seastore/omap_manager/btree/omap_btree_node_impl.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crimson/os/seastore/collection_manager/flat_collection_manager.cc b/src/crimson/os/seastore/collection_manager/flat_collection_manager.cc index b6591bbc02a..08cf84ffa33 100644 --- a/src/crimson/os/seastore/collection_manager/flat_collection_manager.cc +++ b/src/crimson/os/seastore/collection_manager/flat_collection_manager.cc @@ -19,7 +19,7 @@ namespace { namespace crimson::os::seastore::collection_manager { constexpr static segment_off_t MIN_FLAT_BLOCK_SIZE = 4<<10; -constexpr static segment_off_t MAX_FLAT_BLOCK_SIZE = 4<<20; +[[maybe_unused]] constexpr static segment_off_t MAX_FLAT_BLOCK_SIZE = 4<<20; FlatCollectionManager::FlatCollectionManager( TransactionManager &tm) diff --git a/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc b/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc index e1ad0192602..acade8e43a3 100644 --- a/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc +++ b/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc @@ -235,6 +235,7 @@ OMapInnerNode::list( child_result.begin(), child_result.end()); biter++; + (void)max_result_size; assert(child_complete || result.size() == max_result_size); return list_ertr::make_ready_future(false); });