From: Jim Meyering Date: Thu, 3 Nov 2016 02:02:00 +0000 (-0700) Subject: folly/test/ThreadLocalBenchmark.cpp: avoid shadowing warning X-Git-Tag: v2016.11.07.00~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c8fcbc6bae022ff86c6f1b915bb1f98e53dc780d;p=folly.git 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 --- 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()); \ } \ })); \