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

Unified Diff: core/fxcodec/codec/fx_codec_flate.cpp

Issue 1801383002: Re-enable several MSVC warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase again Created 4 years, 9 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 | « core/fxcodec/codec/codec_int.h ('k') | core/fxcodec/codec/fx_codec_jpx_opj.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcodec/codec/fx_codec_flate.cpp
diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp
index 49a4f3416671976c9fa835a7ec8c89920447a859..27416f1c67a007b0cf7242ad2fa76d59042f0cef 100644
--- a/core/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/fxcodec/codec/fx_codec_flate.cpp
@@ -147,7 +147,7 @@ int CLZWDecoder::Decode(uint8_t* dest_buf,
m_Early = bEarlyChange ? 1 : 0;
m_nCodes = 0;
FX_DWORD old_code = (FX_DWORD)-1;
- uint8_t last_char;
+ uint8_t last_char = 0;
while (1) {
if (m_InPos + m_CodeLen > src_size * 8) {
break;
@@ -942,7 +942,7 @@ FX_DWORD CCodec_FlateModule::FlateOrLZWDecode(FX_BOOL bLZW,
offset = src_size;
int err = decoder->Decode(NULL, dest_size, src_buf, offset, bEarlyChange);
if (err || dest_size == 0 || dest_size + 1 < dest_size) {
- return -1;
+ return static_cast<FX_DWORD>(-1);
}
}
{
@@ -965,7 +965,7 @@ FX_DWORD CCodec_FlateModule::FlateOrLZWDecode(FX_BOOL bLZW,
ret =
TIFF_Predictor(dest_buf, dest_size, Colors, BitsPerComponent, Columns);
}
- return ret ? offset : -1;
+ return ret ? offset : static_cast<FX_DWORD>(-1);
}
FX_BOOL CCodec_FlateModule::Encode(const uint8_t* src_buf,
FX_DWORD src_size,
« no previous file with comments | « core/fxcodec/codec/codec_int.h ('k') | core/fxcodec/codec/fx_codec_jpx_opj.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698