projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5898eb2
)
folly/test/SpinLockTest.cpp: avoid shadowing warnings
author
Jim Meyering
<meyering@fb.com>
Wed, 19 Oct 2016 03:28:30 +0000
(20:28 -0700)
committer
Facebook Github Bot
<facebook-github-bot-bot@fb.com>
Wed, 19 Oct 2016 03:38:54 +0000
(20:38 -0700)
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option.
Reviewed By: igorsugak
Differential Revision:
D4041919
fbshipit-source-id:
52579a4b7477192ec7145f81216200f81b191183
folly/test/SpinLockTest.cpp
patch
|
blob
|
history
diff --git
a/folly/test/SpinLockTest.cpp
b/folly/test/SpinLockTest.cpp
index 0312240202402885c9a8b2029f9f7ca304b9086c..3b10b5dbb59c3dfd391c7fc1075690cbde659a99 100644
(file)
--- a/
folly/test/SpinLockTest.cpp
+++ b/
folly/test/SpinLockTest.cpp
@@
-45,8
+45,8
@@
void spinlockTestThread(LockedVal<LOCK>* v) {
SpinLockGuardImpl<LOCK> 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);