From: Jim Meyering Date: Mon, 19 Dec 2016 17:30:11 +0000 (-0800) Subject: folly/io/async/test/EventBaseTest.cpp: doubly-nested for-loop, do not reuse index X-Git-Tag: v2017.03.06.00~183 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=36811cc1138067a17344ff3f389d6e8b479e634f;p=folly.git folly/io/async/test/EventBaseTest.cpp: doubly-nested for-loop, do not reuse index Summary: Fix a warning exposed by gcc's -Wshadow-compatible-local option. Rename inner "i" to "j". Reviewed By: knekritz Differential Revision: D4346505 fbshipit-source-id: f0a4ac32fefd6614900e58d1c8c7f15e8934fd04 --- diff --git a/folly/io/async/test/EventBaseTest.cpp b/folly/io/async/test/EventBaseTest.cpp index 4fa84ed7..1ca9d2d2 100644 --- a/folly/io/async/test/EventBaseTest.cpp +++ b/folly/io/async/test/EventBaseTest.cpp @@ -1838,7 +1838,7 @@ TEST(EventBaseTest, LoopKeepAliveAtomic) { for (size_t i = 0; i < kNumThreads; ++i) { ts.emplace_back([ evbPtr = evb.get(), batonPtr = batons[i].get(), &done ] { std::vector keepAlives; - for (size_t i = 0; i < kNumTasks; ++i) { + for (size_t j = 0; j < kNumTasks; ++j) { keepAlives.emplace_back(evbPtr->loopKeepAliveAtomic()); }