diff --git a/util/thread_status_impl.cc b/util/thread_status_impl.cc index 24be214f8..d07a60463 100644 --- a/util/thread_status_impl.cc +++ b/util/thread_status_impl.cc @@ -68,8 +68,7 @@ Status ThreadStatusImpl::GetThreadList( std::memory_order_relaxed); auto cf_key = thread_data->cf_key.load( std::memory_order_relaxed); - auto iter = cf_info_map_.find( - thread_data->cf_key.load(std::memory_order_relaxed)); + auto iter = cf_info_map_.find(cf_key); assert(cf_key == 0 || iter != cf_info_map_.end()); auto* cf_info = iter != cf_info_map_.end() ? iter->second : nullptr; diff --git a/util/thread_status_impl_debug.cc b/util/thread_status_impl_debug.cc index 1def2b143..5717e40c3 100644 --- a/util/thread_status_impl_debug.cc +++ b/util/thread_status_impl_debug.cc @@ -16,7 +16,7 @@ void ThreadStatusImpl::TEST_VerifyColumnFamilyInfoMap( assert(cf_info_map_.size() == handles.size()); for (auto* handle : handles) { auto* cfd = reinterpret_cast(handle)->cfd(); - auto iter = cf_info_map_.find(cfd); + auto iter __attribute__((unused)) = cf_info_map_.find(cfd); assert(iter != cf_info_map_.end()); assert(iter->second); assert(iter->second->cf_name == cfd->GetName());