aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar herb <herb@google.com>2016-02-29 09:15:11 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-29 09:15:11 -0800
commit69f938f7a17e8621825d3535dd064c4a4dff71d0 (patch)
treef4303d9ab6c279127c9e1ee22f2cf71e192492b9 /src
parent9ae14ff4b1100aad8fe9402080a5ecb5a629f815 (diff)
Fix uninitialized variable warning.
CQ_INCLUDE_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-Mips64-Release-Android-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1743273002 Review URL: https://codereview.chromium.org/1743273002
Diffstat (limited to 'src')
-rw-r--r--src/core/SkLinearBitmapPipeline.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkLinearBitmapPipeline.cpp b/src/core/SkLinearBitmapPipeline.cpp
index 1d08a8bd7c..2090a1e436 100644
--- a/src/core/SkLinearBitmapPipeline.cpp
+++ b/src/core/SkLinearBitmapPipeline.cpp
@@ -177,7 +177,9 @@ void span_fallback(Span span, Stage* stage) {
std::tie(start, length, count) = span;
Sk4f xs{X(start)};
Sk4f ys{Y(start)};
- Sk4s fourDx;
+
+ // Initializing this is not needed, but some compilers can't figure this out.
+ Sk4s fourDx{0.0f};
if (count > 1) {
SkScalar dx = length / (count - 1);
xs = xs + Sk4f{0.0f, 1.0f, 2.0f, 3.0f} * dx;