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 . --- core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp') diff --git a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp index 3cd6106e1c..9248efb718 100644 --- a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp +++ b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp @@ -18,11 +18,10 @@ void FPDFAPI_FindEmbeddedCMap(const char* name, CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals(); const FXCMAP_CMap* pCMaps = pFontGlobals->m_EmbeddedCharsets[charset].m_pMapList; - int nCMaps = pFontGlobals->m_EmbeddedCharsets[charset].m_Count; - for (int i = 0; i < nCMaps; i++) { - if (FXSYS_strcmp(name, pCMaps[i].m_Name)) { + for (uint32_t i = 0; i < pFontGlobals->m_EmbeddedCharsets[charset].m_Count; + i++) { + if (FXSYS_strcmp(name, pCMaps[i].m_Name)) continue; - } pMap = &pCMaps[i]; break; } -- cgit v1.2.3