summaryrefslogtreecommitdiff
path: root/benchmarks/stdlib_benchmark.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/stdlib_benchmark.cpp')
-rw-r--r--benchmarks/stdlib_benchmark.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/benchmarks/stdlib_benchmark.cpp b/benchmarks/stdlib_benchmark.cpp
index 45b953f61..b6ea58db3 100644
--- a/benchmarks/stdlib_benchmark.cpp
+++ b/benchmarks/stdlib_benchmark.cpp
@@ -189,9 +189,8 @@ static void BM_stdlib_mbstowcs(benchmark::State& state) {
buf[l++] = i, buf[l++] = j, buf[l++] = 0x80, buf[l++] = k;
buf[l++] = 0;
- volatile size_t c __attribute__((unused)) = 0;
for (auto _ : state) {
- c = mbstowcs(widebuf_aligned, buf_aligned, 500000);
+ benchmark::DoNotOptimize(mbstowcs(widebuf_aligned, buf_aligned, 500000));
}
state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(500000));