folly/test/ThreadLocalTest.cpp: avoid shadowing warnings
authorJim Meyering <meyering@fb.com>
Wed, 19 Oct 2016 03:05:57 +0000 (20:05 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Wed, 19 Oct 2016 03:09:30 +0000 (20:09 -0700)
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option.

Reviewed By: andrewjcg

Differential Revision: D4041950

fbshipit-source-id: 7c18564273c5839c647709307f56b2fb5e0f6588

folly/test/ThreadLocalTest.cpp

index c3a276d255fffe48c31206642df55a90416823f8..e333913e2ac498c67909e389877205800842a358 100644 (file)
@@ -425,7 +425,7 @@ TEST(ThreadLocal, Stress) {
   std::vector<std::thread> threads;
   threads.reserve(numThreads);
 
-  for (size_t i = 0; i < numThreads; ++i) {
+  for (size_t k = 0; k < numThreads; ++k) {
     threads.emplace_back([&objects] {
       for (size_t rep = 0; rep < numReps; ++rep) {
         for (size_t i = 0; i < objects.size(); ++i) {