From: Jim Meyering Date: Wed, 19 Oct 2016 03:28:30 +0000 (-0700) Subject: folly/test/SpinLockTest.cpp: avoid shadowing warnings X-Git-Tag: v2016.10.24.00~17 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=00de3cea4a176ca6c12901d450ccdc7d6bb94a42;p=folly.git folly/test/SpinLockTest.cpp: avoid shadowing warnings Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: igorsugak Differential Revision: D4041919 fbshipit-source-id: 52579a4b7477192ec7145f81216200f81b191183 --- diff --git a/folly/test/SpinLockTest.cpp b/folly/test/SpinLockTest.cpp index 03122402..3b10b5db 100644 --- a/folly/test/SpinLockTest.cpp +++ b/folly/test/SpinLockTest.cpp @@ -45,8 +45,8 @@ void spinlockTestThread(LockedVal* v) { SpinLockGuardImpl 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);