Project

General

Profile

Actions

Bug #65158

open

common/perf_counters_cache.cc: unused variable warnings

Added by Casey Bodley about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

when compiled in release mode, assert() macros get compiled out. this leads to unused variable warnings:

ceph/src/common/perf_counters_cache.cc: In member function ‘void ceph::perf_counters::PerfCountersCache::check_key(const std::string&)’:
ceph/src/common/perf_counters_cache.cc:16:13: warning: variable ‘key_label’ set but not used [-Wunused-but-set-variable]
   16 |   for (auto key_label : key_labels) {
      |             ^~~~~~~~~
ceph/src/common/perf_counters_cache.cc:7:20: warning: variable ‘key_name’ set but not used [-Wunused-but-set-variable]
    7 |   std::string_view key_name = ceph::perf_counters::key_name(key);
      |                    ^~~~~~~~

No data to display

Actions

Also available in: Atom PDF