From e392b2115c4a15549f805ea91c597a7c18d90a9d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 26 Aug 2016 10:49:27 +0800 Subject: [PATCH] test/unittest_alloc: fix -Wsign-compare warnings Signed-off-by: Kefu Chai --- src/test/objectstore/Allocator_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/objectstore/Allocator_test.cc b/src/test/objectstore/Allocator_test.cc index 89f3c548b47..c72468141f6 100644 --- a/src/test/objectstore/Allocator_test.cc +++ b/src/test/objectstore/Allocator_test.cc @@ -37,7 +37,7 @@ TEST_P(AllocTest, test_alloc_init) { int64_t blocks = BmapEntry::size(); init_alloc(blocks, 1); - ASSERT_EQ(alloc->get_free(), 0); + ASSERT_EQ(0U, alloc->get_free()); alloc->shutdown(); blocks = BitMapZone::get_total_blocks() * 2 + 16; init_alloc(blocks, 1); @@ -73,7 +73,7 @@ TEST_P(AllocTest, test_alloc_min_alloc) EXPECT_EQ(alloc->alloc_extents(4 * (uint64_t)block_size, (uint64_t) block_size, 0, (int64_t) 0, &extents, &count), 0); EXPECT_EQ(extents[0].length, 4 * block_size); - EXPECT_EQ(extents[1].length, 0); + EXPECT_EQ(0U, extents[1].length); EXPECT_EQ(count, 1); } -- 2.39.5