From c8fcbc6bae022ff86c6f1b915bb1f98e53dc780d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 2 Nov 2016 19:02:00 -0700 Subject: [PATCH] folly/test/ThreadLocalBenchmark.cpp: avoid shadowing warning Summary: There was a doubly-nested loop, both with index "i". Change the inner for-loop index from i to j. Reviewed By: yfeldblum Differential Revision: D4120589 fbshipit-source-id: c786d8f7bb1ee05fc990db898b15836032e93940 --- folly/test/ThreadLocalBenchmark.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/test/ThreadLocalBenchmark.cpp b/folly/test/ThreadLocalBenchmark.cpp index 88691e13..824b73ea 100644 --- a/folly/test/ThreadLocalBenchmark.cpp +++ b/folly/test/ThreadLocalBenchmark.cpp @@ -66,7 +66,7 @@ DEFINE_int32(numThreads, 8, "Number simultaneous threads for benchmarks."); for (int i = 0; i < FLAGS_numThreads; ++i) { \ threads.push_back(std::thread([&]() { \ var.reset(new int(0)); \ - for (int i = 0; i < itersPerThread; ++i) { \ + for (int j = 0; j < itersPerThread; ++j) { \ ++(*var.get()); \ } \ })); \ -- 2.34.1