From 5898eb2859c99807343656f4f89ed4f9e5da912d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 18 Oct 2016 20:27:40 -0700 Subject: [PATCH] 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 --- folly/test/SmallLocksTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.34.1