Coverity: Add a default case in SkPDFShader. CID=101159
Code from thestig@chromium.org original CL: http://codereview.appspot.com/5498052/
Review URL: http://codereview.appspot.com/5502052
git-svn-id: http://skia.googlecode.com/svn/trunk@2913 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp
index 218a66e..84c5576 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -455,6 +455,7 @@
break;
case SkShader::kColor_GradientType:
case SkShader::kNone_GradientType:
+ default:
return;
}
@@ -809,7 +810,8 @@
fColorData.set(sk_malloc_throw(
fInfo.fColorCount * (sizeof(SkColor) + sizeof(SkScalar))));
fInfo.fColors = reinterpret_cast<SkColor*>(fColorData.get());
- fInfo.fColorOffsets = reinterpret_cast<SkScalar*>(fInfo.fColors + fInfo.fColorCount);
+ fInfo.fColorOffsets =
+ reinterpret_cast<SkScalar*>(fInfo.fColors + fInfo.fColorCount);
shader.asAGradient(&fInfo);
}
}