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

Unified Diff: src/codec/SkCodec_libpng.cpp

Issue 1400343005: Reenable warnings in src/codec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments Created 5 years, 2 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 | « src/codec/SkCodec_libgif.cpp ('k') | src/codec/SkCodec_wbmp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_libpng.cpp
diff --git a/src/codec/SkCodec_libpng.cpp b/src/codec/SkCodec_libpng.cpp
index 7d41623a887f2e18a85cd8ff8e962395dced8d57..f4d75561d867f9a2dd7facd5be404701876e4ba1 100644
--- a/src/codec/SkCodec_libpng.cpp
+++ b/src/codec/SkCodec_libpng.cpp
@@ -287,8 +287,8 @@ static bool read_header(SkStream* stream, png_structp* png_ptrp,
}
// Now determine the default SkColorType and SkAlphaType and set required transforms
- SkColorType skColorType;
- SkAlphaType skAlphaType;
+ SkColorType skColorType = kUnknown_SkColorType;
+ SkAlphaType skAlphaType = kUnknown_SkAlphaType;
switch (colorType) {
case PNG_COLOR_TYPE_PALETTE:
skColorType = kIndex_8_SkColorType;
@@ -605,8 +605,8 @@ public:
SkPngScanlineDecoder(const SkImageInfo& srcInfo, SkStream* stream,
png_structp png_ptr, png_infop info_ptr, int bitDepth)
: INHERITED(srcInfo, stream, png_ptr, info_ptr, bitDepth, 1)
- , fSrcRow(nullptr)
, fAlphaState(kUnknown_AlphaState)
+ , fSrcRow(nullptr)
{}
Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& options,
@@ -843,4 +843,3 @@ SkCodec* SkPngCodec::NewFromStream(SkStream* stream) {
return new SkPngInterlacedScanlineDecoder(imageInfo, streamDeleter.detach(), png_ptr,
info_ptr, bitDepth, numberPasses);
}
-
« no previous file with comments | « src/codec/SkCodec_libgif.cpp ('k') | src/codec/SkCodec_wbmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698