From b2f73040fc5a00c6e1f924102c5fb507c657b8f7 Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Thu, 4 Jun 2020 17:40:21 +0200 Subject: [PATCH] Fix -Wunused-variable error. Bug: None Change-Id: I13ca43b15f1519e5ce5c17b6eb0b6611dbd20c39 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176505 Commit-Queue: Markus Handell Reviewed-by: Markus Handell Reviewed-by: Karl Wiberg Cr-Commit-Position: refs/heads/master@{#31450} --- rtc_base/synchronization/mutex_benchmark.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rtc_base/synchronization/mutex_benchmark.cc b/rtc_base/synchronization/mutex_benchmark.cc index ee3e3af033..ae7272e8c5 100644 --- a/rtc_base/synchronization/mutex_benchmark.cc +++ b/rtc_base/synchronization/mutex_benchmark.cc @@ -33,11 +33,9 @@ class PerfTestData { int64_t my_counter_ = 0; }; -// TODO(bugs.webrtc.org/11630): remove NOLINT when linter supports mutable -// references. -void BM_LockWithMutex(benchmark::State& state) { // NOLINT +void BM_LockWithMutex(benchmark::State& state) { static PerfTestData test_data; - for (auto s : state) { + for (auto it = state.begin(); it != state.end(); ++it) { benchmark::DoNotOptimize(test_data.AddToCounter(2)); } }