From 2cdd7621b2fe76e6d4e8cc2668e69e367bb1aeda Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Thu, 17 May 2018 18:05:37 +0300 Subject: [PATCH] os/bluestore: fix signed/unsigned mismatch warning during building Signed-off-by: Igor Fedotov --- src/os/bluestore/BitMapAllocator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/bluestore/BitMapAllocator.cc b/src/os/bluestore/BitMapAllocator.cc index f9601939f5371..1857879bffd75 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)); -- 2.39.5