Skip to content

Commit a347eaa

Browse files
fix(examples): remove compilation warning about unused variables
1 parent df26de3 commit a347eaa

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

examples/google_benchmark_cmake/main.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
#include "fixture_bench.hpp"
2-
#include "template_bench.hpp"
31
#include <benchmark/benchmark.h>
2+
43
#include <cstring>
54

5+
#include "fixture_bench.hpp"
6+
#include "template_bench.hpp"
7+
68
template <class... Args>
79
void BM_Capture(benchmark::State &state, Args &&...args) {
810
auto args_tuple = std::make_tuple(std::move(args)...);
11+
(void)args_tuple;
912
for (auto _ : state) {
1013
}
1114
}
@@ -36,8 +39,7 @@ static void BM_memcpy(benchmark::State &state) {
3639
char *src = new char[state.range(0)];
3740
char *dst = new char[state.range(0)];
3841
memset(src, 'x', state.range(0));
39-
for (auto _ : state)
40-
memcpy(dst, src, state.range(0));
42+
for (auto _ : state) memcpy(dst, src, state.range(0));
4143
delete[] src;
4244
delete[] dst;
4345
}

0 commit comments

Comments
 (0)