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

Summary:
Fixed -Werror=unused-but-set-variable in thread_status_impl
This commit is contained in:
Yueh-Hsuan Chiang 2014-11-20 13:44:37 -08:00
parent a564be715d
commit fbc42a0933
2 changed files with 2 additions and 3 deletions

View File

@ -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;

View File

@ -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());