Fix uninitialized variable warning.
authorherb <herb@google.com>
Mon, 29 Feb 2016 17:15:11 +0000 (09:15 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 29 Feb 2016 17:15:11 +0000 (09:15 -0800)
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

src/core/SkLinearBitmapPipeline.cpp

index 1d08a8b..2090a1e 100644 (file)
@@ -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;