Fixed -Werror=unused-but-set-variable in thread_status_impl

Summary:
Fixed -Werror=unused-but-set-variable in thread_status_impl
main
Yueh-Hsuan Chiang 10 years ago
parent a564be715d
commit fbc42a0933
  1. 3
      util/thread_status_impl.cc
  2. 2
      util/thread_status_impl_debug.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;

@ -16,7 +16,7 @@ void ThreadStatusImpl::TEST_VerifyColumnFamilyInfoMap(
assert(cf_info_map_.size() == handles.size());
for (auto* handle : handles) {
auto* cfd = reinterpret_cast<ColumnFamilyHandleImpl*>(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());

Loading…
Cancel
Save