to remove compiler warnings.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
namespace ceph::perf_counters {
void PerfCountersCache::check_key(const std::string &key) {
- std::string_view key_name = ceph::perf_counters::key_name(key);
+ [[maybe_unused]] std::string_view key_name = ceph::perf_counters::key_name(key);
// don't accept an empty key name
assert(key_name != "");
assert(key_labels.begin() != key_labels.end());
// don't accept keys where any labels in the key have an empty key name
- for (auto key_label : key_labels) {
+ for ([[maybe_unused]] auto key_label : key_labels) {
assert(key_label.first != "");
}
}