Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp

Issue 1840483003: Reduce signed/unsigned comparison warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp
index eafda43965225d92bc511c84142354fde1c7f039..7442f540cc22e217e32430febf141d7a4b1714c5 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp
@@ -185,7 +185,7 @@ FX_BOOL CPDF_HintTables::ReadPageHintTable(CFX_BitStream* hStream) {
if (!CanReadFromBitStream(hStream, required_bits))
return FALSE;
- for (int j = 0; j < m_dwNSharedObjsArray[i]; j++)
+ for (size_t j = 0; j < m_dwNSharedObjsArray[i]; j++)
Tom Sepez 2016/03/25 22:31:40 This one should be an uint32_t, though. Its an ar
Wei Li 2016/03/26 01:04:10 Done.
m_dwIdentifierArray.Add(hStream->GetBits(dwSharedIdBits));
}
hStream->ByteAlign();
@@ -385,7 +385,7 @@ IPDF_DataAvail::DocAvailStatus CPDF_HintTables::CheckPage(
FX_DWORD dwIndex = 0;
FX_DWORD dwObjNum = 0;
- for (int j = 0; j < m_dwNSharedObjsArray[index]; ++j) {
+ for (size_t j = 0; j < m_dwNSharedObjsArray[index]; ++j) {
dwIndex = m_dwIdentifierArray[offset + j];
if (dwIndex >= m_dwSharedObjNumArray.GetSize())
return IPDF_DataAvail::DataNotAvailable;

Powered by Google App Engine
This is Rietveld 408576698