From 05d53f0355e9889c43bfa436e985d5643f249d99 Mon Sep 17 00:00:00 2001 From: Wei Li Date: Tue, 29 Mar 2016 16:42:53 -0700 Subject: Code change to avoid signed/unsigned mismatch warnings. This makes pdfium code on Linux and Mac sign-compare warning free. The warning flag will be re-enabled after checking on windows clang build. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1841643002 . --- fpdfsdk/javascript/Field.cpp | 2 +- fpdfsdk/javascript/PublicMethods.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/javascript') diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp index 54b4f6432c..5b8750d88e 100644 --- a/fpdfsdk/javascript/Field.cpp +++ b/fpdfsdk/javascript/Field.cpp @@ -1014,7 +1014,7 @@ void Field::SetCurrentValueIndices(CPDFSDK_Document* pDocument, for (size_t i = 0; i < array.size(); ++i) { if (i != 0 && !(dwFieldFlags & (1 << 21))) break; - if (array[i] < pFormField->CountOptions() && + if (array[i] < static_cast(pFormField->CountOptions()) && !pFormField->IsItemSelected(array[i])) { pFormField->SetItemSelection(array[i], TRUE); } diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp index a4c13564c8..62659e4163 100644 --- a/fpdfsdk/javascript/PublicMethods.cpp +++ b/fpdfsdk/javascript/PublicMethods.cpp @@ -1502,7 +1502,7 @@ FX_BOOL CJS_PublicMethods::AFSpecial_KeystrokeEx( if (wChange.empty()) return TRUE; - int iIndexMask = pEvent->SelStart(); + size_t iIndexMask = pEvent->SelStart(); size_t combined_len = wstrValue.length() + wChange.length() - (pEvent->SelEnd() - pEvent->SelStart()); -- cgit v1.2.3