diff options
author | robertphillips <robertphillips@google.com> | 2016-04-07 09:01:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-07 09:01:20 -0700 |
commit | 73add93a9cac83f2369dec94e3e392d26590c838 (patch) | |
tree | 31b6bb7f8558b7edaa6ab5f4586dcd44e890d5ab | |
parent | 8cd4a24236ffc26522d0372c0d0ab0d96e301b3b (diff) |
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
-rw-r--r-- | include/gpu/GrTestUtils.h | 4 | ||||
-rw-r--r-- | src/pathops/SkPathOpsSimplify.cpp | 2 | ||||
-rw-r--r-- | tests/PathOpsSimplifyRectThreadedTest.cpp | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/include/gpu/GrTestUtils.h b/include/gpu/GrTestUtils.h index 8ffae09ddd..475e38a6a1 100644 --- a/include/gpu/GrTestUtils.h +++ b/include/gpu/GrTestUtils.h @@ -51,7 +51,7 @@ static inline GrColor GrRandomColor(SkRandom* random) { }; 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 @@ static inline uint8_t GrRandomCoverage(SkRandom* random) { }; 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 08bb26d9a9..97f0350db2 100644 --- a/src/pathops/SkPathOpsSimplify.cpp +++ b/src/pathops/SkPathOpsSimplify.cpp @@ -216,7 +216,7 @@ bool Simplify(const SkPath& path, SkPath* result) { 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 8c4e03c460..7289440e0e 100644 --- a/tests/PathOpsSimplifyRectThreadedTest.cpp +++ b/tests/PathOpsSimplifyRectThreadedTest.cpp @@ -42,7 +42,8 @@ static void testSimplify4x4RectsMain(PathOpsThreadState* data) 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 |