diff --git a/cache/lru_cache.cc b/cache/lru_cache.cc index bcdd2c6b8..185f1d870 100644 --- a/cache/lru_cache.cc +++ b/cache/lru_cache.cc @@ -103,7 +103,7 @@ void LRUHandleTable::Resize() { std::unique_ptr new_list { new LRUHandle* [size_t{1} << new_length_bits] {} }; - uint32_t count = 0; + [[maybe_unused]] uint32_t count = 0; for (uint32_t i = 0; i < old_length; i++) { LRUHandle* h = list_[i]; while (h != nullptr) { diff --git a/db/internal_stats.cc b/db/internal_stats.cc index a49657a73..0fa565ee0 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -658,11 +658,6 @@ void InternalStats::CollectCacheEntryStats(bool foreground) { min_interval_factor); } -std::function Blah() { - static int x = 42; - return [&]() { ++x; }; -} - std::function InternalStats::CacheEntryRoleStats::GetEntryCallback() { diff --git a/db/version_edit_handler.cc b/db/version_edit_handler.cc index df537d68a..f7a148968 100644 --- a/db/version_edit_handler.cc +++ b/db/version_edit_handler.cc @@ -27,7 +27,7 @@ void VersionEditHandlerBase::Iterate(log::Reader& reader, assert(log_read_status); assert(log_read_status->ok()); - size_t recovered_edits = 0; + [[maybe_unused]] size_t recovered_edits = 0; Status s = Initialize(); while (reader.LastRecordEnd() < max_manifest_read_size_ && s.ok() && reader.ReadRecord(&record, &scratch) && log_read_status->ok()) {