From: Jim Meyering Date: Wed, 19 Oct 2016 03:01:00 +0000 (-0700) Subject: folly/futures/test/WhileDoTest.cpp: avoid shadowing warnings X-Git-Tag: v2016.10.24.00~22 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=85eb12f0d646c50427495b40ac1ec186efc5fcf1;p=folly.git 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 --- 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); }