summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_cmaps
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-29 16:42:53 -0700
committerWei Li <weili@chromium.org>2016-03-29 16:42:53 -0700
commit05d53f0355e9889c43bfa436e985d5643f249d99 (patch)
treeeca037b407114efe357e8280a96e44eee182cdfc /core/fpdfapi/fpdf_cmaps
parent602aebc11a615971800d38f8d427a4e4f95c1134 (diff)
downloadpdfium-05d53f0355e9889c43bfa436e985d5643f249d99.tar.xz
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 .
Diffstat (limited to 'core/fpdfapi/fpdf_cmaps')
-rw-r--r--core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp7
1 files changed, 3 insertions, 4 deletions
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;
}