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
This commit is contained in:
robertphillips 2016-04-07 09:01:20 -07:00 committed by Commit bot
parent 8cd4a24236
commit 73add93a9c
3 changed files with 5 additions and 4 deletions

View File

@ -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;

View File

@ -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)) {

View File

@ -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