diff options
author | David Robillard <d@drobilla.net> | 2022-09-16 15:30:03 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-09-16 22:31:06 -0400 |
commit | 342a22b6d75597ee22c195b60607402e3ed028b2 (patch) | |
tree | cf8f70188e8d7f71fd49ca0095e96343c9de3773 /test | |
parent | dcd6280af88f74024e5a690bb4483dce43a61a1f (diff) | |
download | chilbert-342a22b6d75597ee22c195b60607402e3ed028b2.tar.gz chilbert-342a22b6d75597ee22c195b60607402e3ed028b2.tar.bz2 chilbert-342a22b6d75597ee22c195b60607402e3ed028b2.zip |
Suppress unused variable warnings in benchmarks
Diffstat (limited to 'test')
-rw-r--r-- | test/bench_bitvec.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/bench_bitvec.cpp b/test/bench_bitvec.cpp index 3c7d7f6..6580af9 100644 --- a/test/bench_bitvec.cpp +++ b/test/bench_bitvec.cpp @@ -132,6 +132,8 @@ struct BenchNone { T v = make_random_bitvec<T, N>(ctx); bool r = false; + (void)r; + return run_bench([&](auto) { r = v.none(); }); } }; @@ -143,6 +145,8 @@ struct BenchCount { T v = make_random_bitvec<T, N>(ctx); volatile size_t r = 0; + (void)r; + return run_bench([&](auto) { r = v.count(); }); } }; @@ -186,6 +190,8 @@ struct BenchRightRotate { T v = make_random_bitvec<T, N>(ctx); volatile bool r = false; + (void)r; + return run_bench([&](const auto i) { v.rotr(i % N); r = v.test(0); @@ -200,6 +206,8 @@ struct BenchFindFirst { T v = make_random_bitvec<T, N>(ctx); volatile size_t r = 0; + (void)r; + return run_bench([&](auto) { r = v.find_first(); }); } }; |