From 85eb12f0d646c50427495b40ac1ec186efc5fcf1 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 18 Oct 2016 20:01:00 -0700 Subject: [PATCH] folly/futures/test/WhileDoTest.cpp: avoid shadowing warnings Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: nisardan Differential Revision: D4041779 fbshipit-source-id: 375e485a30f01a0610d881fe8b3237cc062aedef --- folly/futures/test/WhileDoTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/futures/test/WhileDoTest.cpp b/folly/futures/test/WhileDoTest.cpp index 15fdfbf3..ef7c422c 100644 --- a/folly/futures/test/WhileDoTest.cpp +++ b/folly/futures/test/WhileDoTest.cpp @@ -121,11 +121,11 @@ TEST(WhileDo, failure) { TEST(WhileDo, interrupt) { std::queue>> ps; std::mutex ps_mutex; - int i = 0; int interrupt = 0; bool complete = false; bool failure = false; + int i = 0; auto pred = makePred(i); auto thunk = makeThunk(ps, interrupt, ps_mutex); auto f = folly::whileDo(pred, thunk) @@ -137,7 +137,7 @@ TEST(WhileDo, interrupt) { FutureException eggs("eggs"); f.raise(eggs); - for (int i = 1; i <= 3; ++i) { + for (int j = 1; j <= 3; ++j) { EXPECT_EQ(1, interrupt); popAndFulfillPromise(ps, ps_mutex); } -- 2.34.1