From 36811cc1138067a17344ff3f389d6e8b479e634f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 19 Dec 2016 09:30:11 -0800 Subject: [PATCH] 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 --- folly/io/async/test/EventBaseTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); } -- 2.34.1