Skip to content

Commit 3800064

Browse files
authored
Mark the benchmark _ as unused. (#99)
This just makes clang happier. Signed-off-by: Chris Lalancette <[email protected]>
1 parent cdef749 commit 3800064

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rcl_logging_spdlog/test/benchmark/benchmark_logging_interface.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include <rcutils/allocator.h>
1717
#include <rcutils/logging.h>
18+
#include <rcutils/macros.h>
1819

1920
#include <rcl_logging_interface/rcl_logging_interface.h>
2021

@@ -72,6 +73,7 @@ BENCHMARK_F(LoggingBenchmarkPerformance, log_level_hit)(benchmark::State & st)
7273
reset_heap_counters();
7374

7475
for (auto _ : st) {
76+
RCUTILS_UNUSED(_);
7577
rcl_logging_external_log(RCUTILS_LOG_SEVERITY_INFO, nullptr, data.c_str());
7678
}
7779
}
@@ -80,6 +82,7 @@ BENCHMARK_F(LoggingBenchmarkPerformance, log_level_miss)(benchmark::State & st)
8082
{
8183
setLogLevel(RCUTILS_LOG_SEVERITY_INFO, st);
8284
for (auto _ : st) {
85+
RCUTILS_UNUSED(_);
8386
rcl_logging_external_log(RCUTILS_LOG_SEVERITY_DEBUG, nullptr, data.c_str());
8487
}
8588
}
@@ -95,6 +98,7 @@ BENCHMARK_F(PerformanceTest, logging_reinitialize)(benchmark::State & st)
9598
reset_heap_counters();
9699

97100
for (auto _ : st) {
101+
RCUTILS_UNUSED(_);
98102
ret = rcl_logging_external_initialize(nullptr, allocator);
99103
if (ret != RCL_LOGGING_RET_OK) {
100104
st.SkipWithError(rcutils_get_error_string().str);
@@ -111,6 +115,7 @@ BENCHMARK_F(PerformanceTest, logging_initialize_shutdown)(benchmark::State & st)
111115
{
112116
rcutils_allocator_t allocator = rcutils_get_default_allocator();
113117
for (auto _ : st) {
118+
RCUTILS_UNUSED(_);
114119
rcl_logging_ret_t ret = rcl_logging_external_initialize(nullptr, allocator);
115120
if (ret != RCL_LOGGING_RET_OK) {
116121
st.SkipWithError(rcutils_get_error_string().str);

0 commit comments

Comments
 (0)