From: Igor Fedotov Date: Thu, 17 May 2018 15:05:37 +0000 (+0300) Subject: os/bluestore: fix signed/unsigned mismatch warning during building X-Git-Tag: v14.0.0~65^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F22064%2Fhead;p=ceph.git os/bluestore: fix signed/unsigned mismatch warning during building Signed-off-by: Igor Fedotov --- diff --git a/src/os/bluestore/BitMapAllocator.cc b/src/os/bluestore/BitMapAllocator.cc index f9601939f537..1857879bffd7 100644 --- a/src/os/bluestore/BitMapAllocator.cc +++ b/src/os/bluestore/BitMapAllocator.cc @@ -113,7 +113,7 @@ int64_t BitMapAllocator::allocate( auto res = allocate_dis(want_size, alloc_unit / m_block_size, max_alloc_size, hint / m_block_size, extents); - if (res < want_size) { + if (res > 0 && res < static_cast(want_size)) { auto unused = want_size - res; int nblks = unused / m_block_size; assert(!(unused % m_block_size));