]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cls/fifo: cast ceph_le64 to uint64_t before printing it
authorKefu Chai <kchai@redhat.com>
Fri, 9 Oct 2020 07:54:35 +0000 (15:54 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 9 Oct 2020 08:49:17 +0000 (16:49 +0800)
commit56a4ba77d695eec04528e11f7b6e672742ef378c
treeffd9a720126a7583f4aa6bf30efcebcdd7217987
parent2cb09bd4bd79863f019ec58df01df0551fc84202
cls/fifo: cast ceph_le64 to uint64_t before printing it

silences warning like:

../src/cls/fifo/cls_fifo.cc: In member function ‘int rados::cls::fifo::{anonymous}::EntryReader::get_next_entry(ceph::buffer::v15_2_0::list*, uint64_t*, ceph::real_time*)’:
../src/include/rados/objclass.h:33:18: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 7 has type ‘ceph_le64’ {aka ‘ceph_le<long long unsigned int>’} [-Wformat=]
   33 |   cls_log(level, "<cls> %s:%d: " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
../src/include/rados/objclass.h:33:18: note: in definition of macro ‘CLS_LOG’
   33 |   cls_log(level, "<cls> %s:%d: " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
      |                  ^~~~~~~~~~~~~~~
../src/cls/fifo/cls_fifo.cc:703:48: note: format string is defined here
  703 |   CLS_LOG(10, "%s():%d: pre_header.pre_size=%llu", __func__, __LINE__,
      |                                             ~~~^
      |                                                |
      |                                                long long unsigned int

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/cls/fifo/cls_fifo.cc