diff --git a/src/test/common/test_bloom_filter.cc b/src/test/common/test_bloom_filter.cc index 033fd00a7ec..304357339f6 100644 --- a/src/test/common/test_bloom_filter.cc +++ b/src/test/common/test_bloom_filter.cc @@ -22,7 +22,7 @@ TEST(BloomFilter, Basic) { ASSERT_TRUE(bf.contains("foo")); ASSERT_TRUE(bf.contains("bar")); - ASSERT_EQ(2, bf.element_count()); + ASSERT_EQ(2U, bf.element_count()); } TEST(BloomFilter, Empty) { @@ -300,6 +300,6 @@ TEST(BloomFilter, Assignement) { ASSERT_TRUE(bf2.contains("foo")); ASSERT_FALSE(bf2.contains("bar")); - ASSERT_EQ(2, bf1.element_count()); - ASSERT_EQ(1, bf2.element_count()); + ASSERT_EQ(2U, bf1.element_count()); + ASSERT_EQ(1U, bf2.element_count()); } diff --git a/src/test/libradosstriper/aio.cc b/src/test/libradosstriper/aio.cc index 873c803dc29..dbb6a335de0 100644 --- a/src/test/libradosstriper/aio.cc +++ b/src/test/libradosstriper/aio.cc @@ -410,7 +410,7 @@ TEST_F(StriperTestPP, RoundTripAppendPP) { TestAlarm alarm; my_completion3->wait_for_complete(); } - ASSERT_EQ(sizeof(buf) + sizeof(buf2), my_completion3->get_return_value()); + ASSERT_EQ(sizeof(buf) + sizeof(buf2), (unsigned)my_completion3->get_return_value()); ASSERT_EQ(0, memcmp(bl3.c_str(), buf, sizeof(buf))); ASSERT_EQ(0, memcmp(bl3.c_str() + sizeof(buf), buf2, sizeof(buf2))); my_completion->release(); @@ -495,7 +495,7 @@ TEST_F(StriperTest, RoundTripWriteFull) { TestAlarm alarm; rados_aio_wait_for_complete(my_completion3); } - ASSERT_EQ(sizeof(buf2), rados_aio_get_return_value(my_completion3)); + ASSERT_EQ(sizeof(buf2), (unsigned)rados_aio_get_return_value(my_completion3)); ASSERT_EQ(0, memcmp(buf3, buf2, sizeof(buf2))); rados_aio_release(my_completion); rados_aio_release(my_completion2); @@ -534,7 +534,7 @@ TEST_F(StriperTestPP, RoundTripWriteFullPP) { TestAlarm alarm; my_completion3->wait_for_complete(); } - ASSERT_EQ(sizeof(buf2), my_completion3->get_return_value()); + ASSERT_EQ(sizeof(buf2), (unsigned)my_completion3->get_return_value()); ASSERT_EQ(0, memcmp(bl3.c_str(), buf2, sizeof(buf2))); my_completion->release(); my_completion2->release(); diff --git a/src/test/libradosstriper/io.cc b/src/test/libradosstriper/io.cc index 9ea7bfcffa5..0850c71903b 100644 --- a/src/test/libradosstriper/io.cc +++ b/src/test/libradosstriper/io.cc @@ -241,7 +241,7 @@ TEST_F(StriperTestPP, TruncTestGrowPP) { ASSERT_EQ(0, striper.append("TruncTestGrowPP", bl, sizeof(buf))); ASSERT_EQ(0, striper.trunc("TruncTestGrowPP", sizeof(buf) * 2)); bufferlist bl2; - ASSERT_EQ(sizeof(buf)*2, striper.read("TruncTestGrowPP", &bl2, sizeof(buf)*2, 0)); + ASSERT_EQ(sizeof(buf)*2, (unsigned)striper.read("TruncTestGrowPP", &bl2, sizeof(buf)*2, 0)); ASSERT_EQ(0, memcmp(bl2.c_str(), buf, sizeof(buf))); memset(buf, 0x00, sizeof(buf)); ASSERT_EQ(0, memcmp(bl2.c_str()+sizeof(buf), buf, sizeof(buf))); diff --git a/src/test/strtol.cc b/src/test/strtol.cc index 3c008b6035d..08ba081ac2b 100644 --- a/src/test/strtol.cc +++ b/src/test/strtol.cc @@ -159,7 +159,7 @@ static void test_strict_sistrtoll_units(const std::string& foo, long long tmp = strict_strtoll(str, 10, &err2); ASSERT_EQ(err2, ""); tmp = (tmp << m); - ASSERT_EQ(tmp, r); + ASSERT_EQ(tmp, (long long)r); } TEST(SIStrToLL, WithUnits) {