]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
os/bluestore/BlueStore: make maybe unused variable [[maybe_unused]]
authorKefu Chai <kchai@redhat.com>
Mon, 16 Aug 2021 09:17:48 +0000 (17:17 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 16 Aug 2021 09:17:50 +0000 (17:17 +0800)
commit436e9309ed0d09da254c843509ac395d625a9e3e
treea0bcb4d1eae2b3f4c88943eb396c5422a2d39201
parent7c5848cad9fe2caa8fd5acd188d4168430477dd9
os/bluestore/BlueStore: make maybe unused variable [[maybe_unused]]

cct is defined so it can be used by dout(), but when the source code is
compiled for crimson, dout() does not use cct at all, so in that case,
compiler complains like:

../src/os/bluestore/BlueStore.cc:17413:8: warning: unused variable 'cct' [-Wunused-variable]
  auto cct  = onode->c->store->cct;
       ^
1 warning generated.

in this change, cct is marked with [[maybe_unused]] to silence this
warning.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/os/bluestore/BlueStore.cc