From: Jim Meyering Date: Wed, 19 Oct 2016 03:27:40 +0000 (-0700) Subject: folly/test/SmallLocksTest.cpp: avoid shadowing warnings X-Git-Tag: v2016.10.24.00~18 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5898eb2859c99807343656f4f89ed4f9e5da912d;p=folly.git folly/test/SmallLocksTest.cpp: avoid shadowing warnings Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: igorsugak Differential Revision: D4041910 fbshipit-source-id: d00ea6b294559f80244a226fadf1a3a54c50c78a --- diff --git a/folly/test/SmallLocksTest.cpp b/folly/test/SmallLocksTest.cpp index 020c7136..5bb9ddb5 100644 --- a/folly/test/SmallLocksTest.cpp +++ b/folly/test/SmallLocksTest.cpp @@ -75,8 +75,8 @@ void splock_test() { MSLGuard g(v.lock); int first = v.ar[0]; - for (size_t i = 1; i < sizeof v.ar / sizeof i; ++i) { - EXPECT_EQ(first, v.ar[i]); + for (size_t j = 1; j < sizeof v.ar / sizeof j; ++j) { + EXPECT_EQ(first, v.ar[j]); } int byte = folly::Random::rand32(rng);