diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-23 11:34:44 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-23 11:34:44 -0700 |
commit | 065e9321b84fc0490f3da9099e8840c65e06868d (patch) | |
tree | 3b0bb772a59669f06b86824a444fd06642592d4b /core/src/fxcodec/jbig2 | |
parent | 3c012fef2bb72c8ec1faa73e11ee35539b2559d6 (diff) | |
download | pdfium-065e9321b84fc0490f3da9099e8840c65e06868d.tar.xz |
Fix FX_BOOL type mismatches.
Extracted from https://codereview.chromium.org/1252613002/
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1253603002 .
Diffstat (limited to 'core/src/fxcodec/jbig2')
-rw-r--r-- | core/src/fxcodec/jbig2/JBig2_Context.cpp | 22 | ||||
-rw-r--r-- | core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp | 2 | ||||
-rw-r--r-- | core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp | 7 |
3 files changed, 19 insertions, 12 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_Context.cpp b/core/src/fxcodec/jbig2/JBig2_Context.cpp index ed26ec6833..68c973547c 100644 --- a/core/src/fxcodec/jbig2/JBig2_Context.cpp +++ b/core/src/fxcodec/jbig2/JBig2_Context.cpp @@ -873,7 +873,7 @@ failed: return nRet; } -FX_BOOL CJBig2_Context::parseTextRegion(CJBig2_Segment *pSegment) +int32_t CJBig2_Context::parseTextRegion(CJBig2_Segment *pSegment) { FX_DWORD dwTemp; FX_WORD wFlags; @@ -1239,7 +1239,7 @@ failed: return nRet; } -FX_BOOL CJBig2_Context::parsePatternDict(CJBig2_Segment *pSegment, IFX_Pause* pPause) +int32_t CJBig2_Context::parsePatternDict(CJBig2_Segment *pSegment, IFX_Pause* pPause) { FX_DWORD dwTemp; uint8_t cFlags; @@ -1293,7 +1293,7 @@ failed: delete pPDD; return nRet; } -FX_BOOL CJBig2_Context::parseHalftoneRegion(CJBig2_Segment *pSegment, IFX_Pause* pPause) +int32_t CJBig2_Context::parseHalftoneRegion(CJBig2_Segment *pSegment, IFX_Pause* pPause) { FX_DWORD dwTemp; uint8_t cFlags; @@ -1387,7 +1387,7 @@ failed: return nRet; } -FX_BOOL CJBig2_Context::parseGenericRegion(CJBig2_Segment *pSegment, IFX_Pause* pPause) +int32_t CJBig2_Context::parseGenericRegion(CJBig2_Segment *pSegment, IFX_Pause* pPause) { FX_DWORD dwTemp; uint8_t cFlags; @@ -1504,7 +1504,7 @@ failed: return nRet; } -FX_BOOL CJBig2_Context::parseGenericRefinementRegion(CJBig2_Segment *pSegment) +int32_t CJBig2_Context::parseGenericRefinementRegion(CJBig2_Segment *pSegment) { FX_DWORD dwTemp; JBig2RegionInfo ri; @@ -1591,7 +1591,7 @@ failed: delete pGRRD; return nRet; } -FX_BOOL CJBig2_Context::parseTable(CJBig2_Segment *pSegment) +int32_t CJBig2_Context::parseTable(CJBig2_Segment *pSegment) { pSegment->m_nResultType = JBIG2_HUFFMAN_TABLE_POINTER; JBIG2_ALLOC(pSegment->m_Result.ht, CJBig2_HuffmanTable(m_pStream)); @@ -1618,9 +1618,15 @@ JBig2HuffmanCode *CJBig2_Context::decodeSymbolIDHuffmanTable(CJBig2_BitStream *p FX_DWORD SBNUMSYMS) { JBig2HuffmanCode *SBSYMCODES; - int32_t runcodes[35], runcodes_len[35], runcode; - int32_t i, j, nTemp, nVal, nBits; + int32_t runcodes[35]; + int32_t runcodes_len[35]; + int32_t runcode; + int32_t i; + int32_t j; + int32_t nVal; + int32_t nBits; int32_t run; + FX_DWORD nTemp; SBSYMCODES = (JBig2HuffmanCode*)m_pModule->JBig2_Malloc2(sizeof(JBig2HuffmanCode), SBNUMSYMS); for (i = 0; i < 35; i ++) { if(pStream->readNBits(4, &runcodes_len[i]) != 0) { diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp index 622f04b160..cabcd4c634 100644 --- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp +++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp @@ -2101,7 +2101,7 @@ CJBig2_Image *CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecoder, J CJBig2_Image *IBI; FX_DWORD WI, HI; int32_t IDS; - FX_BOOL RI; + int RI; int32_t RDWI, RDHI, RDXI, RDYI; CJBig2_Image *IBOI; FX_DWORD WOI, HOI; diff --git a/core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp index dd820ae4ca..ef84547992 100644 --- a/core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp +++ b/core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp @@ -14,9 +14,10 @@ CJBig2_HuffmanDecoder::~CJBig2_HuffmanDecoder() } int CJBig2_HuffmanDecoder::decodeAValue(CJBig2_HuffmanTable *pTable, int *nResult) { - int nVal, nTmp, i, nBits; - nVal = 0; - nBits = 0; + int i; + int nVal = 0; + int nBits = 0; + FX_DWORD nTmp; while(1) { if(m_pStream->read1Bit(&nTmp) == -1) { return -1; |