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

Unified Diff: src/core/SkColorSpaceXformOpts.h

Issue 2206143003: Fix compiler complaints about uninit vars (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Set to zero Created 4 years, 4 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/SkColorSpaceXformOpts.h
diff --git a/src/core/SkColorSpaceXformOpts.h b/src/core/SkColorSpaceXformOpts.h
index 63074796b111459c60e25651c91d243308c34d7b..d0862c74f235bd798d2336c46984723a8fb84e2e 100644
--- a/src/core/SkColorSpaceXformOpts.h
+++ b/src/core/SkColorSpaceXformOpts.h
@@ -28,7 +28,7 @@ static inline void load_matrix(const float matrix[16],
}
static inline void load_rgb_from_tables(const uint32_t* src,
- Sk4f& r, Sk4f& g, Sk4f& b, Sk4f&,
+ Sk4f& r, Sk4f& g, Sk4f& b, Sk4f& a,
const float* const srcTables[3]) {
r = { srcTables[0][(src[0] >> 0) & 0xFF],
srcTables[0][(src[1] >> 0) & 0xFF],
@@ -42,6 +42,7 @@ static inline void load_rgb_from_tables(const uint32_t* src,
srcTables[2][(src[1] >> 16) & 0xFF],
srcTables[2][(src[2] >> 16) & 0xFF],
srcTables[2][(src[3] >> 16) & 0xFF], };
+ a = 0.0f; // Don't let the compiler complain that |a| is uninitialized.
}
static inline void load_rgba_from_tables(const uint32_t* src,
« 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