From d4e8f1222ca17b57ac74019b2fc3706e1192645c Mon Sep 17 00:00:00 2001 From: Wei Li Date: Mon, 21 Mar 2016 11:20:44 -0700 Subject: Re-enable several MSVC warnings Re-enable the following warnings: 4245: signed/unsigned conversion mismatch; 4310: cast may truncate data; 4389: operator on signed/unsigned mismatch; 4701: use potentially uninitialized local variable; 4706: assignment within conditional expression Clean up the code to avoid those warnings. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1801383002 . --- fpdfsdk/javascript/Document.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/javascript') diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp index 144d428989..36ea910a47 100644 --- a/fpdfsdk/javascript/Document.cpp +++ b/fpdfsdk/javascript/Document.cpp @@ -1459,7 +1459,7 @@ int Document::CountWords(CPDF_TextObject* pTextObj) { FX_BOOL bIsLatin = FALSE; for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) { - FX_DWORD charcode = -1; + FX_DWORD charcode = static_cast(-1); FX_FLOAT kerning; pTextObj->GetCharInfo(i, charcode, kerning); @@ -1492,7 +1492,7 @@ CFX_WideString Document::GetObjWordStr(CPDF_TextObject* pTextObj, FX_BOOL bIsLatin = FALSE; for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) { - FX_DWORD charcode = -1; + FX_DWORD charcode = static_cast(-1); FX_FLOAT kerning; pTextObj->GetCharInfo(i, charcode, kerning); -- cgit v1.2.3