Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: src/core/SkLinearBitmapPipeline.cpp

Issue 1743273002: Fix uninitialized variable warning. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLinearBitmapPipeline.cpp
diff --git a/src/core/SkLinearBitmapPipeline.cpp b/src/core/SkLinearBitmapPipeline.cpp
index 1d08a8bd7c295efc21be311337bebe53261da47f..2090a1e436764f2c581b40d6b6f1444ec5d75fd7 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698