diff --git a/cache/lru_cache.cc b/cache/lru_cache.cc index bb9186f1eee..60cfb345885 100644 --- a/cache/lru_cache.cc +++ b/cache/lru_cache.cc @@ -91,7 +91,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/version_edit_handler.cc b/db/version_edit_handler.cc index 4ea007a8a68..584da3c12e8 100644 --- a/db/version_edit_handler.cc +++ b/db/version_edit_handler.cc @@ -26,7 +26,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()) { diff --git a/db/version_set.cc b/db/version_set.cc index 24a19bf1618..8b4eea23483 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -3108,13 +3108,9 @@ void VersionStorageInfo::SetFinalized() { assert(MaxBytesForLevel(level) >= max_bytes_prev_level); max_bytes_prev_level = MaxBytesForLevel(level); } - int num_empty_non_l0_level = 0; for (int level = 0; level < num_levels(); level++) { assert(LevelFiles(level).size() == 0 || LevelFiles(level).size() == LevelFilesBrief(level).num_files); - if (level > 0 && NumLevelBytes(level) > 0) { - num_empty_non_l0_level++; - } if (LevelFiles(level).size() > 0) { assert(level < num_non_empty_levels()); } diff --git a/third-party/folly/folly/Traits.h b/third-party/folly/folly/Traits.h index ea7e1eb1c05..90e14025e9a 100644 --- a/third-party/folly/folly/Traits.h +++ b/third-party/folly/folly/Traits.h @@ -13,7 +13,7 @@ namespace folly { #if !defined(_MSC_VER) template struct is_trivially_copyable - : std::integral_constant {}; + : std::integral_constant {}; #else template using is_trivially_copyable = std::is_trivially_copyable;