]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/bufferlist: fix warning
authorSage Weil <sage@inktank.com>
Tue, 19 Feb 2013 23:33:20 +0000 (15:33 -0800)
committerSage Weil <sage@inktank.com>
Tue, 19 Feb 2013 23:33:20 +0000 (15:33 -0800)
In file included from test/bufferlist.cc:31:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = unsigned int, T2 = 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 = unsigned int, T2 = int, bool lhs_is_null_literal = false]’
test/bufferlist.cc:1604:227: 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/bufferlist.cc

index 50508d0085ec13e3be47a6a3af407862c2cbe0e6..b23bd33e55a4af77c297f9d4a42ac0c72f5a9cd1 100644 (file)
@@ -1601,7 +1601,7 @@ TEST(BufferList, read_fd) {
   bufferlist bl;
   EXPECT_EQ(-EBADF, bl.read_fd(fd, len));
   fd = ::open("testfile", O_RDONLY);
-  EXPECT_EQ(len, bl.read_fd(fd, len));
+  EXPECT_EQ(len, (unsigned)bl.read_fd(fd, len));
   EXPECT_EQ(len, bl.length());
   EXPECT_EQ(CEPH_PAGE_SIZE - len, bl.buffers().front().unused_tail_length());
   ::close(fd);