Appease valgrind wrt testing code initialization
The new swarming valgrind bot appears to be higher maintenance. These changes seem harmless and will, hopefully, unblock the bot.
TBR=bsalomon@google.com
https://build.chromium.org/p/client.skia.fyi/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-SwarmingValgrind/builds/57
BUG=skia:5164
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1867053002
Review URL: https://codereview.chromium.org/1867053002
diff --git a/include/gpu/GrTestUtils.h b/include/gpu/GrTestUtils.h
index 8ffae09..475e38a 100644
--- a/include/gpu/GrTestUtils.h
+++ b/include/gpu/GrTestUtils.h
@@ -51,7 +51,7 @@
};
ColorMode colorMode = ColorMode(random->nextULessThan(kLast_ColorMode + 1));
- GrColor color;
+ GrColor color SK_INIT_TO_AVOID_WARNING;
switch (colorMode) {
case kAllOnes_ColorMode:
color = GrColorPackRGBA(0xFF, 0xFF, 0xFF, 0xFF);
@@ -87,7 +87,7 @@
};
CoverageMode colorMode = CoverageMode(random->nextULessThan(kLast_CoverageMode + 1));
- uint8_t coverage;
+ uint8_t coverage SK_INIT_TO_AVOID_WARNING;
switch (colorMode) {
case kZero_CoverageMode:
coverage = 0;
diff --git a/src/pathops/SkPathOpsSimplify.cpp b/src/pathops/SkPathOpsSimplify.cpp
index 08bb26d..97f0350 100644
--- a/src/pathops/SkPathOpsSimplify.cpp
+++ b/src/pathops/SkPathOpsSimplify.cpp
@@ -216,7 +216,7 @@
result->reset();
result->setFillType(fillType);
SkPathWriter wrapper(*result);
- bool closable;
+ bool closable SK_INIT_TO_AVOID_WARNING;
if (builder.xorMask() == kWinding_PathOpsMask
? !bridgeWinding(contourList, &wrapper, &allocator, &closable)
: !bridgeXor(contourList, &wrapper, &allocator, &closable)) {
diff --git a/tests/PathOpsSimplifyRectThreadedTest.cpp b/tests/PathOpsSimplifyRectThreadedTest.cpp
index 8c4e03c..7289440 100644
--- a/tests/PathOpsSimplifyRectThreadedTest.cpp
+++ b/tests/PathOpsSimplifyRectThreadedTest.cpp
@@ -42,7 +42,8 @@
SkPath path, out;
char* str = pathStr;
path.setFillType(SkPath::kWinding_FillType);
- int l, t, r, b;
+ int l SK_INIT_TO_AVOID_WARNING, t SK_INIT_TO_AVOID_WARNING,
+ r SK_INIT_TO_AVOID_WARNING, b SK_INIT_TO_AVOID_WARNING;
if (aShape) {
switch (aShape) {
case 1: // square