From 3cc01f2ba255f4b7584668ee2b8e5ed97792c26d Mon Sep 17 00:00:00 2001 From: weili Date: Mon, 16 May 2016 13:53:42 -0700 Subject: Fix the code that causes warnings These are the left or newly added code which causes compilation warnings of "signed and unsigned comparison". Need to fix them before I re-enable the warning flag. BUG=pdfium:29 Review-Url: https://codereview.chromium.org/1986533002 --- core/fpdfapi/fpdf_parser/cpdf_document.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fpdfapi/fpdf_parser/cpdf_document.cpp') diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.cpp b/core/fpdfapi/fpdf_parser/cpdf_document.cpp index 52899eedb3..13d9737b5b 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp @@ -1102,7 +1102,7 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTA* pLogFont, pBaseDict->SetAtName("Encoding", "WinAnsiEncoding"); } else { flags |= PDFFONT_NONSYMBOLIC; - int i; + size_t i; for (i = 0; i < FX_ArraySize(g_FX_CharsetUnicodes); ++i) { if (g_FX_CharsetUnicodes[i].m_Charset == pLogFont->lfCharSet) break; @@ -1136,7 +1136,7 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTA* pLogFont, int char_widths[224]; GetCharWidth(hDC, 32, 255, char_widths); CPDF_Array* pWidths = new CPDF_Array; - for (int i = 0; i < 224; i++) + for (size_t i = 0; i < 224; i++) pWidths->AddInteger(char_widths[i]); pBaseDict->SetAt("Widths", pWidths); -- cgit v1.2.3