From d8f5acb8f6cdedee8d65db542c7f557d4538adef Mon Sep 17 00:00:00 2001 From: Yingxin Cheng Date: Thu, 19 May 2022 15:44:16 +0800 Subject: [PATCH] crimson/os/seastore/cache: ignore maybe unused variables Signed-off-by: Yingxin Cheng --- src/crimson/os/seastore/cache.cc | 2 ++ src/crimson/os/seastore/cache.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/crimson/os/seastore/cache.cc b/src/crimson/os/seastore/cache.cc index 92cd6c59226c..6734b30389a7 100644 --- a/src/crimson/os/seastore/cache.cc +++ b/src/crimson/os/seastore/cache.cc @@ -1302,6 +1302,7 @@ void Cache::backref_batch_update( for (auto &ent : list) { if (ent->laddr == L_ADDR_NULL) { auto [it, insert] = backref_remove_set.insert(*ent); + boost::ignore_unused(insert); #ifndef NDEBUG if (!insert) { ERROR("backref_remove_set already contains {}", ent->paddr); @@ -1317,6 +1318,7 @@ void Cache::backref_batch_update( assert(!r); #endif auto [it, insert] = backref_inserted_set.insert(*ent); + boost::ignore_unused(insert); assert(insert); } } diff --git a/src/crimson/os/seastore/cache.h b/src/crimson/os/seastore/cache.h index e2a174e01203..6c20ceb4fe0d 100644 --- a/src/crimson/os/seastore/cache.h +++ b/src/crimson/os/seastore/cache.h @@ -949,6 +949,7 @@ public: void add_backref_extent(paddr_t paddr, extent_types_t type) { assert(!paddr.is_relative()); auto [iter, inserted] = backref_extents.emplace(paddr, type); + boost::ignore_unused(inserted); assert(inserted); } -- 2.47.3