Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: silence warning from -Wsign-compare #17790

Merged
merged 1 commit into from Sep 25, 2017

Conversation

Projects
None yet
3 participants
@joscollin
Copy link
Member

commented Sep 19, 2017

Fixed warnings:

In file included from ceph/src/test/test_xlist.cc:6:0:
ceph/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 = long unsigned int; T2 = int]’:
ceph/src/googletest/googletest/include/gtest/gtest.h:1421:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
ceph/src/test/test_xlist.cc:46:3:   required from here
ceph/src/googletest/googletest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (lhs == rhs) {
       ~~~~^~~~~~
In file included from ceph/src/test/librados/tier.cc:3:0:
ceph/src/googletest/googletest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperLT(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = long unsigned int]’:
ceph/src/test/librados/tier.cc:1360:5:   required from here
ceph/src/googletest/googletest/include/gtest/gtest.h:1526:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ceph/src/googletest/googletest/include/gtest/gtest.h:1510:7:
   if (val1 op val2) {\
       ~~~~~~~~~             
ceph/src/googletest/googletest/include/gtest/gtest.h:1526:28:
 GTEST_IMPL_CMP_HELPER_(LT, <);
ceph/src/googletest/googletest/include/gtest/gtest.h:1510:12: note: in definition of macro ‘GTEST_IMPL_CMP_HELPER_’
   if (val1 op val2) {\
            ^~
In file included from ceph/src/test/librados/tier.cc:3:0:
ceph/src/googletest/googletest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperLT(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = long unsigned int]’:
ceph/src/test/librados/tier.cc:1365:2:   required from here
ceph/src/googletest/googletest/include/gtest/gtest.h:1526:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ceph/src/googletest/googletest/include/gtest/gtest.h:1510:7:
   if (val1 op val2) {\
       ~~~~~~~~~             
ceph/src/googletest/googletest/include/gtest/gtest.h:1526:28:
 GTEST_IMPL_CMP_HELPER_(LT, <);
ceph/src/googletest/googletest/include/gtest/gtest.h:1510:12: note: in definition of macro ‘GTEST_IMPL_CMP_HELPER_’
   if (val1 op val2) {\

Signed-off-by: Jos Collin jcollin@redhat.com

test: silence warning from -Wsign-compare
Fixed warnings:
ceph/src/test/test_xlist.cc:46:3:   required from here
ceph/src/googletest/googletest/include/gtest/gtest.h:1392:11: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]

ceph/src/test/librados/tier.cc:1360:5:   required from here
ceph/src/googletest/googletest/include/gtest/gtest.h:1526:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

ceph/src/test/librados/tier.cc:1365:2:   required from here
ceph/src/googletest/googletest/include/gtest/gtest.h:1526:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Jos Collin <jcollin@redhat.com>

@joscollin joscollin force-pushed the joscollin:wip-test-warning-signed-unsigned branch from f41da18 to 6854af9 Sep 19, 2017

@joscollin joscollin requested a review from xiexingguo Sep 21, 2017

@liewegas liewegas merged commit 2c3ec10 into ceph:master Sep 25, 2017

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@joscollin joscollin deleted the joscollin:wip-test-warning-signed-unsigned branch Sep 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.