Fix cases of variable shadowing in gm/.

These were reviewed last year at http://review.skia.org/312480 but never
landed. Splitting into small chunks to land individually.

If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.

Change-Id: Ie6a262328315a5726265ef4afede7e0e66337752
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435718
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/gm/arcto.cpp b/gm/arcto.cpp
index 20528c8..46964b6 100644
--- a/gm/arcto.cpp
+++ b/gm/arcto.cpp
@@ -158,8 +158,7 @@
                 uint32_t y = rand.nextRangeU(30, 70);
                 uint32_t x = rand.nextRangeU(30, 70);
                 spec.printf("M %d,%d\n", x, y);
-                uint32_t count = rand.nextRangeU(0, 10);
-                for (uint32_t i = 0; i < count; ++i) {
+                for (uint32_t i = rand.nextRangeU(0, 10); i--; ) {
                     spec.append(MakeRandomParsePathPiece(&rand));
                 }
                 SkAssertResult(SkParsePath::FromSVGString(spec.c_str(), &path));