]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds/cephfs_features: print size_t using "%zu"
authorKefu Chai <kchai@redhat.com>
Thu, 1 Jul 2021 14:11:20 +0000 (22:11 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 1 Jul 2021 14:16:13 +0000 (22:16 +0800)
commitdb0763aaa495f1f6fe8bd6d07f859de647de761a
treed926f18be2bf40781710679041ebc6e977af8187
parente9717a47353325312565d524e52fd3f3e557b8ca
mds/cephfs_features: print size_t using "%zu"

to silence the warning from GCC like:

../src/mds/cephfs_features.cc: In function 'void cephfs_dump_features(ceph::Formatter*, const feature_bitset_t&)':
../src/mds/cephfs_features.cc:71:39: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'long long unsigned int'} [-Wformat=]
   71 |     snprintf(s, sizeof(s), "feature_%lu", i);
      |                                     ~~^   ~
      |                                       |   |
      |                                       |   size_t {aka long long unsigned int}
      |                                       long unsigned int
      |                                     %llu

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mds/cephfs_features.cc