]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
erasure-code,test: silence -Wunused-variable warnings
authorKefu Chai <kchai@redhat.com>
Wed, 21 Nov 2018 12:43:38 +0000 (20:43 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 21 Nov 2018 12:47:56 +0000 (20:47 +0800)
commitb86150b4b256d13f0ab3bf7aee35c9a13c8ce7d9
tree091e6aeec17601ccc7b8adee3c45d505cd2b3ab9
parent0a0e9f0179c237ec7331bd1dc3ce85366d2a4326
erasure-code,test: silence -Wunused-variable warnings

GCC 7.3 does not support [[maybe_unused]] very well, so it emits
-Wunused-variable warnings even if the variables are marked with
maybe_unused. moreover, the C++17 standard does not forbid these
warnings:

> For an entity marked maybe_unused, implementations are encouraged not
to emit a warning that the entity is unused, or that the entity is used
despite the presence of the attribute.

see also n4659, dcl.attr.unused

so, in this change, the warnings are silenced manually.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/erasure-code/clay/ErasureCodeClay.cc
src/test/crimson/test_perfcounters.cc