summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/jbig2
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-05-08 13:52:49 -0700
committerLei Zhang <thestig@chromium.org>2015-05-08 13:52:49 -0700
commitea7b333c73ea3e1847e79cabdd85853af67d6d6c (patch)
tree4f04b9ab62d02b4a3050d914008260611ea575c8 /core/src/fxcodec/jbig2
parenteff208f03dc7ea7606a3dc03150291f264147d60 (diff)
downloadpdfium-ea7b333c73ea3e1847e79cabdd85853af67d6d6c.tar.xz
Merge to XFA: Fix a bunch of -Wunused-but-set-variable warnings.
Also fix a few nits and other errors along the way. Review URL: https://codereview.chromium.org/1098583002 Review URL: https://codereview.chromium.org/1135713004 (cherry picked from commit f0a169e6fd5718995fa6ef8749c8d16cdad84985) (cherry picked from commit 470408c2ffe71e99cebad0d1d6887f1723f02cef) R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1133453006
Diffstat (limited to 'core/src/fxcodec/jbig2')
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
index 53faab4a46..a5928f9ea3 100644
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
@@ -888,7 +888,7 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template3_opt2(CJBig2_ArithDecoder *p
CJBig2_Image *GBREG;
FX_DWORD line1;
FX_BYTE *pLine, cVal;
- FX_INTPTR nStride, nStride2;
+ FX_INTPTR nStride;
FX_INT32 nBits, k;
LTP = 0;
JBIG2_ALLOC(GBREG, CJBig2_Image(GBW, GBH));
@@ -899,7 +899,6 @@ CJBig2_Image *CJBig2_GRDProc::decode_Arith_Template3_opt2(CJBig2_ArithDecoder *p
}
pLine = GBREG->m_pData;
nStride = GBREG->m_nStride;
- nStride2 = nStride << 1;
for(FX_DWORD h = 0; h < GBH; h++) {
if(TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x0195]);
@@ -2335,7 +2334,7 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecod
CJBig2_Image **SDNEWSYMS;
FX_DWORD HCHEIGHT, NSYMSDECODED;
FX_INT32 HCDH;
- FX_DWORD SYMWIDTH, TOTWIDTH, HCFIRSTSYM;
+ FX_DWORD SYMWIDTH, TOTWIDTH;
FX_INT32 DW;
CJBig2_Image *BS;
FX_DWORD I, J, REFAGGNINST;
@@ -2345,7 +2344,6 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecod
FX_DWORD EXRUNLENGTH;
FX_INT32 nVal;
FX_DWORD nTmp;
- FX_BOOL SBHUFF;
FX_DWORD SBNUMSYMS;
FX_BYTE SBSYMCODELEN;
FX_DWORD IDI;
@@ -2394,7 +2392,6 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecod
}
SYMWIDTH = 0;
TOTWIDTH = 0;
- HCFIRSTSYM = NSYMSDECODED;
for(;;) {
nVal = IADW->decode(pArithDecoder, &DW);
if(nVal == JBIG2_OOB) {
@@ -2537,7 +2534,6 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecod
delete SBHUFFRSIZE;
delete pDecoder;
} else if(REFAGGNINST == 1) {
- SBHUFF = SDHUFF;
SBNUMSYMS = SDNUMINSYMS + NSYMSDECODED;
if(IAID->decode(pArithDecoder, (int*)&IDI) == -1) {
m_pModule->JBig2_Error("symbol dictionary decoding procedure (arith): too short.");
@@ -2686,7 +2682,6 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Huffman(CJBig2_BitStream *pStream,
FX_DWORD EXRUNLENGTH;
FX_INT32 nVal, nBits;
FX_DWORD nTmp;
- FX_BOOL SBHUFF;
FX_DWORD SBNUMSYMS;
FX_BYTE SBSYMCODELEN;
JBig2HuffmanCode *SBSYMCODES;
@@ -2843,7 +2838,6 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Huffman(CJBig2_BitStream *pStream,
delete SBHUFFRSIZE;
delete pDecoder;
} else if(REFAGGNINST == 1) {
- SBHUFF = SDHUFF;
SBNUMSYMS = SDNUMINSYMS + SDNUMNEWSYMS;
nTmp = 1;
while((FX_DWORD)(1 << nTmp) < SBNUMSYMS) {