]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/msgr: silence warnings from -Wsign-compare
authorJos Collin <jcollin@redhat.com>
Thu, 8 Jun 2017 11:18:20 +0000 (16:48 +0530)
committerJos Collin <jcollin@redhat.com>
Thu, 8 Jun 2017 11:18:24 +0000 (16:48 +0530)
The following warning appears during make in the latest code:

ceph/src/test/msgr/test_msgr.cc:1474:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     CHECK_AND_WAIT_TRUE(srv_dispatcher.count > last + 1);
                         ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
ceph/src/test/msgr/test_msgr.cc:54:9: note: in definition of macro ‘CHECK_AND_WAIT_TRUE’
     if (expr)                           \
         ^~~~
ceph/src/test/msgr/test_msgr.cc:1475:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (srv_dispatcher.count == last) {

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/test/msgr/test_msgr.cc

index 4d43dc694997975c827d1a3cca29163f704d140c..3a9397be9a689bb88500a7b6d56bfaef540ca5ff 100644 (file)
@@ -1461,7 +1461,7 @@ TEST_P(MessengerTest, MarkdownTest) {
   client_msgr->start();
 
   int i = 1000;
-  int64_t last = 0;
+  uint64_t last = 0;
   bool equal = false;
   uint64_t equal_count = 0;
   while (i--) {