]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/tests: silence -Wsign-compare warning 25072/head
authorKefu Chai <kchai@redhat.com>
Tue, 13 Nov 2018 08:45:10 +0000 (16:45 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 14 Nov 2018 16:59:02 +0000 (00:59 +0800)
silence warning like

In file included from
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/test/objectstore/store_test.cc:25:0:
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/googletest/googletest/include/gtest/gtest.h:
In instantiation of 'testing::AssertionResult
testing::internal::CmpHelperEQ(const char*, const char*, const T1&,
const T2&) [with T1 = int; T2 = long unsigned int]':

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/objectstore/store_test.cc

index 7d1756f30ae334536821295bcc53a00e2d23a3c1..dd424b11443ab1b2213c52b6b952728dd3af712c 100644 (file)
@@ -7419,7 +7419,7 @@ TEST_P(StoreTest, mergeRegionTest) {
     final_len = (offset + chunk_size * 3 - 3) + (chunk_size * 2);
     bufferlist bl;
     r = store->read(ch, hoid, 0, final_len, bl);
-    ASSERT_EQ(r, final_len);
+    ASSERT_EQ(final_len, static_cast<uint64_t>(r));
   }
 }
 #endif  // WITH_BLUESTORE