aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-12-21 01:49:35 +0000
committerGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-12-21 01:49:35 +0000
commit020798af6780ba29156f4daec87c29ae9e4f4a12 (patch)
treefad1ecdab6516c1e236c37e1f3b573edbde9b1f0 /src
parent73f3dedf597757bd3e7036b657eeb790fb5a1fb9 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/pdf/SkPDFShader.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp
index 218a66eeda..84c55767ce 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -455,6 +455,7 @@ SkPDFFunctionShader::SkPDFFunctionShader(SkPDFShader::State* state)
break;
case SkShader::kColor_GradientType:
case SkShader::kNone_GradientType:
+ default:
return;
}
@@ -809,7 +810,8 @@ SkPDFShader::State::State(const SkShader& shader,
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);
}
}