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

Unified Diff: core/fpdfapi/fpdf_parser/fpdf_parser_decode.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/fpdfapi/fpdf_parser/cpdf_parser.cpp ('k') | core/fpdfapi/fpdf_render/fpdf_render_text.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
index f7fc3099fc87d38d919341b026f936445cbf8c45..c91e99b9cb540066baf24a66475a6829e6f90338 100644
--- a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
+++ b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
@@ -177,14 +177,14 @@ FX_DWORD RunLengthDecode(const uint8_t* src_buf,
old = dest_size;
dest_size += src_buf[i] + 1;
if (dest_size < old) {
- return (FX_DWORD)-1;
+ return static_cast<FX_DWORD>(-1);
}
i += src_buf[i] + 2;
} else if (src_buf[i] > 128) {
old = dest_size;
dest_size += 257 - src_buf[i];
if (dest_size < old) {
- return (FX_DWORD)-1;
+ return static_cast<FX_DWORD>(-1);
}
i += 2;
} else {
@@ -192,7 +192,7 @@ FX_DWORD RunLengthDecode(const uint8_t* src_buf,
}
}
if (dest_size >= _STREAM_MAX_SIZE_) {
- return -1;
+ return static_cast<FX_DWORD>(-1);
}
dest_buf = FX_Alloc(uint8_t, dest_size);
i = 0;
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_parser.cpp ('k') | core/fpdfapi/fpdf_render/fpdf_render_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698