]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
msg/Message: use an unsigned type for get_data_len()
authorKefu Chai <kchai@redhat.com>
Wed, 14 Apr 2021 03:21:42 +0000 (11:21 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 15 Apr 2021 04:37:44 +0000 (12:37 +0800)
commit5c243ca419528d2846d25a55a8dc3751fceae04f
treeeef05cd86c2d0478225d56d596eb84746981ad8e
parent5505fc0051a302fed46aa2ecaa8c8aa2a75b9e91
msg/Message: use an unsigned type for get_data_len()

to avoid warnings like:

../src/osd/PrimaryLogPG.cc:2123:27: warning: comparison of integer expressions of different signedness: ‘off_t’ {aka ‘long int’} and ‘uint64_t’ {aka ‘long unsigned int’} [-Wsign-compare]
 2123 |         m->get_data_len() > cct->_conf->osd_max_write_size << 20) {
      |         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

after change the size options' type to unsigned or uint64_t.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/msg/Message.h