os/bluestore/BitAllocator: fix compiler warning.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
This commit is contained in:
Jianpeng Ma 2016-06-07 07:42:28 +08:00
parent fca97f8619
commit 7ae1db2ba0

View File

@ -105,20 +105,20 @@ public:
}
m_cur_idx++;
if (m_cur_idx == m_list->size() &&
if (m_cur_idx == (int64_t)m_list->size() &&
m_wrap) {
m_cur_idx %= m_list->size();
m_wrapped = true;
}
if (cur_idx == m_list->size()) {
if (cur_idx == (int64_t)m_list->size()) {
/*
* End of list
*/
return NULL;
}
debug_assert(cur_idx < m_list->size());
debug_assert(cur_idx < (int64_t)m_list->size());
return &(*m_list)[cur_idx];
}