]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_objectstore: fix signed/unsigned warning
authorSage Weil <sage@inktank.com>
Sun, 23 Feb 2014 17:03:42 +0000 (09:03 -0800)
committerSage Weil <sage@inktank.com>
Sun, 23 Feb 2014 17:03:42 +0000 (09:03 -0800)
In file included from test/objectstore/store_test.cc:33:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int]’:
../src/gtest/include/gtest/gtest.h:1300:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int, bool lhs_is_null_literal = false]’
test/objectstore/store_test.cc:484:193: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
src/test/objectstore/store_test.cc

index 3ace88069312fd78b30c0a9e6e4508d43702474b..938d4ca5ecc94c9ed214c560a773cb53cd0b3847 100644 (file)
@@ -481,7 +481,7 @@ public:
         len = max_len;
       ASSERT_EQ(len, result.length());
       contents[obj].copy(offset, len, bl);
-      ASSERT_EQ(r, len);
+      ASSERT_EQ(r, (int)len);
       ASSERT_TRUE(result.contents_equal(bl));
     }
   }