提交 fbc42a09 编写于 作者: Y Yueh-Hsuan Chiang

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

Summary:
Fixed -Werror=unused-but-set-variable in thread_status_impl
上级 a564be71
......@@ -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());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册