mirror of
https://github.com/ceph/ceph
synced 2025-01-03 09:32:43 +00:00
Merge pull request #1945 from dachary/wip-warnings
tests: fix signess warning Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
This commit is contained in:
commit
6c4c1b71f1
@ -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());
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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)));
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user