]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
TestErasureCodeShec: fix some -Wsign-compare
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 17 Mar 2015 16:16:42 +0000 (17:16 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 15 Apr 2015 10:21:15 +0000 (12:21 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/erasure-code/TestErasureCodeShec.cc
src/test/erasure-code/TestErasureCodeShec_all.cc

index 25325f64d2d01642350aefb140babd132ed5d980..09443fca5fca0b0f9b7d5a6eda305e15562ac24b 100644 (file)
@@ -59,10 +59,10 @@ TEST(ErasureCodeShec, init_1)
   int r = shec->init(*parameters);
 
   //check parameters
-  EXPECT_EQ(6u, shec->k);
-  EXPECT_EQ(4u, shec->m);
-  EXPECT_EQ(3u, shec->c);
-  EXPECT_EQ(8u, shec->w);
+  EXPECT_EQ(6, shec->k);
+  EXPECT_EQ(4, shec->m);
+  EXPECT_EQ(3, shec->c);
+  EXPECT_EQ(8, shec->w);
   EXPECT_EQ(ErasureCodeShec::MULTIPLE, shec->technique);
   EXPECT_STREQ("default", shec->ruleset_root.c_str());
   EXPECT_STREQ("osd", shec->ruleset_failure_domain.c_str());
@@ -1093,7 +1093,7 @@ TEST(ErasureCodeShec, minimum_to_decode_3)
   int r = shec->minimum_to_decode(want_to_decode, available_chunks,
                                  &minimum_chunks);
   EXPECT_EQ(-EINVAL, r);
-  EXPECT_EQ(0, minimum_chunks.size());
+  EXPECT_EQ(0u, minimum_chunks.size());
 
   delete shec;
   delete parameters;
index db2a1b2163f4979434c5809171ff84349ccb0586..22241ce355a507729a6dc4328b6e855a5d754b9c 100644 (file)
@@ -184,7 +184,7 @@ TEST_P(ParameterTest, parameter_all)
 
   result = shec->encode(want_to_encode, in, &encoded);
   EXPECT_EQ(0, result);
-  EXPECT_EQ(i_k+i_m, encoded.size());
+  EXPECT_EQ(i_k+i_m, (int)encoded.size());
   EXPECT_EQ(c_size, encoded[0].length());
 
   //decode
@@ -248,10 +248,10 @@ TEST_P(ParameterTest, parameter_all)
   EXPECT_STREQ("myrule", crush->rule_name_map[0].c_str());
 
   //get_chunk_count
-  EXPECT_EQ(i_k+i_m, shec->get_chunk_count());
+  EXPECT_EQ(i_k+i_m, (int)shec->get_chunk_count());
 
   //get_data_chunk_count
-  EXPECT_EQ(i_k, shec->get_data_chunk_count());
+  EXPECT_EQ(i_k, (int)shec->get_data_chunk_count());
 
   //get_chunk_size
   EXPECT_EQ(c_size, shec->get_chunk_size(192));