summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode
diff options
context:
space:
mode:
authorJun Fang <jun_fang@foxitsoftware.com>2015-11-03 19:01:30 -0800
committerJun Fang <jun_fang@foxitsoftware.com>2015-11-03 19:01:30 -0800
commit4a8eeb74d38a1589c21ec06b68262d7795dd8f71 (patch)
tree9a78f3fb9223adf2a3d26eb972da4461c3d22b5f /xfa/src/fxbarcode
parent844ccfeab312ed294059de94118a40336df875d7 (diff)
downloadpdfium-4a8eeb74d38a1589c21ec06b68262d7795dd8f71.tar.xz
Remove unused variables
BUG=pdfium:261 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1413343003 .
Diffstat (limited to 'xfa/src/fxbarcode')
-rw-r--r--xfa/src/fxbarcode/BC_BarCode.cpp1
-rw-r--r--xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp1
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp1
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp7
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDReader.cpp1
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimReader.cpp2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp1
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp1
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp4
-rw-r--r--xfa/src/fxbarcode/pdf417/BC_PDF417.cpp1
-rw-r--r--xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp1
-rw-r--r--xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp2
-rw-r--r--xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp4
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp1
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderDecoder.cpp1
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.cpp2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp1
18 files changed, 7 insertions, 29 deletions
diff --git a/xfa/src/fxbarcode/BC_BarCode.cpp b/xfa/src/fxbarcode/BC_BarCode.cpp
index bb7ed6b1dc..2bc0559b12 100644
--- a/xfa/src/fxbarcode/BC_BarCode.cpp
+++ b/xfa/src/fxbarcode/BC_BarCode.cpp
@@ -785,7 +785,6 @@ void CBC_PDF417I::SetTruncated(FX_BOOL truncated) {
FX_BOOL CBC_PDF417I::Encode(const CFX_WideStringC& contents,
FX_BOOL isDevice,
int32_t& e) {
- BCFORMAT format = BCFORMAT_PDF_417;
int32_t outWidth = 0;
int32_t outHeight = 0;
uint8_t* data = ((CBC_PDF417Writer*)m_pBCWriter)
diff --git a/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp b/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
index 127a20b4f9..b94508f900 100644
--- a/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
+++ b/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp
@@ -226,7 +226,6 @@ CFX_PtrArray* CBC_ReedSolomonGF256Poly::Divide(CBC_ReedSolomonGF256Poly* other,
int32_t inverseDenominatorLeadingTeam =
m_field->Inverse(denominatorLeadingTerm, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
- FX_BOOL bFirst = TRUE;
while (remainder->GetDegree() >= other->GetDegree() && !remainder->IsZero()) {
int32_t degreeDifference = remainder->GetDegree() - other->GetDegree();
int32_t scale =
diff --git a/xfa/src/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp b/xfa/src/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp
index 3931206140..3663b9f84e 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp
@@ -91,7 +91,6 @@ FX_WCHAR CBC_ASCIIEncoder::encodeASCIIDigits(FX_WCHAR digit1,
if (CBC_HighLevelEncoder::isDigit(digit1) &&
CBC_HighLevelEncoder::isDigit(digit2)) {
int32_t num = (digit1 - 48) * 10 + (digit2 - 48);
- FX_WCHAR a = (FX_WCHAR)(num + 130);
return (FX_WCHAR)(num + 130);
}
e = BCExceptionIllegalArgumentNotGigits;
diff --git a/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp b/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
index 32dd416522..ffb52350c9 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
@@ -151,16 +151,9 @@ CFX_WideString CBC_ErrorCorrection::createECCBlock(CFX_WideString codewords,
FX_WORD* ecc = FX_Alloc(FX_WORD, numECWords);
FXSYS_memset(ecc, 0, numECWords * sizeof(FX_WORD));
for (int32_t l = start; l < start + len; l++) {
- uint8_t A = (uint8_t)codewords.GetAt(l);
- FX_WORD B = ecc[numECWords - 1];
FX_WORD m = ecc[numECWords - 1] ^ codewords.GetAt(l);
for (int32_t k = numECWords - 1; k > 0; k--) {
if (m != 0 && FACTORS[table][k] != 0) {
- int32_t a = LOG[FACTORS[table][k]];
- int32_t b = ALOG[(LOG[m] + LOG[FACTORS[table][k]]) % 255];
- FX_WORD c = ecc[k - 1];
- FX_WORD D =
- (ecc[k - 1] ^ ALOG[(LOG[m] + LOG[FACTORS[table][k]]) % 255]);
ecc[k] = (FX_WORD)(ecc[k - 1] ^
ALOG[(LOG[m] + LOG[FACTORS[table][k]]) % 255]);
} else {
diff --git a/xfa/src/fxbarcode/oned/BC_OneDReader.cpp b/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
index 2338d0d086..6e4798b666 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
@@ -44,7 +44,6 @@ CFX_ByteString CBC_OneDReader::Decode(CBC_BinaryBitmap* image,
CFX_ByteString CBC_OneDReader::DeDecode(CBC_BinaryBitmap* image,
int32_t hints,
int32_t& e) {
- int32_t width = image->GetWidth();
int32_t height = image->GetHeight();
CBC_CommonBitArray* row = NULL;
int32_t middle = height >> 1;
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp b/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
index 77c34802b5..67bfd80995 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
@@ -87,7 +87,7 @@ CFX_ByteString CBC_OneDimReader::DecodeRow(int32_t rowNumber,
int32_t hints,
int32_t& e) {
CFX_ByteString result;
- int32_t endStart = DecodeMiddle(row, startGuardRange, result, e);
+ DecodeMiddle(row, startGuardRange, result, e);
BC_EXCEPTION_CHECK_ReturnValue(e, "");
FX_BOOL b = CheckChecksum(result, e);
BC_EXCEPTION_CHECK_ReturnValue(e, "");
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
index 8332986bae..11d1021aa2 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -197,7 +197,7 @@ void CBC_OneDimWriter::ShowDeviceChars(CFX_RenderDevice* device,
if (matrix != NULL) {
affine_matrix.Concat(*matrix);
}
- FX_BOOL ret = device->DrawNormalText(
+ device->DrawNormalText(
str.GetLength(), pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
(FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
FXTEXT_CLEARTYPE);
@@ -216,7 +216,7 @@ void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
FX_RECT geRect(0, 0, (int)geWidth, iTextHeight);
ge.FillRect(&geRect, m_backgroundColor);
CFX_AffineMatrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
- FX_BOOL ret = ge.DrawNormalText(
+ ge.DrawNormalText(
str.GetLength(), pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
(FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
FXTEXT_CLEARTYPE);
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp
index 2c30024dd1..bdea697841 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp
@@ -145,7 +145,6 @@ FX_BOOL CBC_OnedCode128Writer::IsDigits(const CFX_ByteString& contents,
uint8_t* CBC_OnedCode128Writer::Encode(const CFX_ByteString& contents,
int32_t& outLength,
int32_t& e) {
- int32_t length = contents.GetLength();
if (contents.GetLength() < 1 || contents.GetLength() > 80) {
e = BCExceptionContentsLengthShouldBetween1and80;
return NULL;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
index 9caa0cb43a..43bd696379 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
@@ -92,7 +92,6 @@ CFX_ByteString CBC_OnedCode39Reader::DecodeRow(int32_t rowNumber,
for (int32_t j = 0; j < counters.GetSize(); j++) {
lastPatternSize += counters[j];
}
- int32_t whiteSpaceAfterEnd = nextStart - lastStart - lastPatternSize;
if (m_usingCheckDigit) {
int32_t max = result.GetLength() - 1;
int32_t total = 0;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index 0c551ccc6b..74ef0fb1f4 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -229,7 +229,7 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents,
1.0, 0.0, 0.0, -1.0, (FX_FLOAT)leftPosition * m_outputHScale,
(FX_FLOAT)(m_Height - iTextHeight + iFontSize));
affine_matrix1.Concat(*matrix);
- FX_BOOL ret = device->DrawNormalText(
+ device->DrawNormalText(
iLen, pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
(FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix1, m_fontColor,
FXTEXT_CLEARTYPE);
@@ -257,7 +257,7 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents,
if (matrix != NULL) {
affine_matrix1.Concat(*matrix);
}
- FX_BOOL ret = device->DrawNormalText(
+ device->DrawNormalText(
iLen, pCharPos + 4, m_pFont, CFX_GEModule::Get()->GetFontCache(),
(FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix1, m_fontColor,
FXTEXT_CLEARTYPE);
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417.cpp
index f38758f4bc..a3db95ddf5 100644
--- a/xfa/src/fxbarcode/pdf417/BC_PDF417.cpp
+++ b/xfa/src/fxbarcode/pdf417/BC_PDF417.cpp
@@ -506,7 +506,6 @@ void CBC_PDF417::encodeLowLevel(CFX_WideString fullCodewords,
for (int32_t y = 0; y < r; y++) {
int32_t cluster = y % 3;
logic->startRow();
- int32_t a = START_PATTERN;
encodeChar(START_PATTERN, 17, logic->getCurrentRow());
int32_t left;
int32_t right;
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp
index a0d8b697d0..9e0351fd35 100644
--- a/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp
+++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ECErrorCorrection.cpp
@@ -284,7 +284,6 @@ CFX_PtrArray* CBC_PDF417ECErrorCorrection::runEuclideanAlgorithm(
ttemp = t;
j++;
}
- int32_t aa = t->getCoefficient(1);
int32_t sigmaTildeAtZero = t->getCoefficient(0);
if (sigmaTildeAtZero == 0) {
e = BCExceptionChecksumException;
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
index 80694b91f3..db321bc846 100644
--- a/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
+++ b/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
@@ -203,8 +203,6 @@ int32_t CBC_PDF417HighLevelEncoder::encodeText(CFX_WideString msg,
break;
case SUBMODE_MIXED:
if (isMixed(ch)) {
- FX_WCHAR a = MIXED[ch];
- int32_t b = (int32_t)a;
tmp += MIXED[ch];
} else {
if (isAlphaUpper(ch)) {
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp
index 1c12c6402f..a34213c153 100644
--- a/xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp
+++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp
@@ -641,7 +641,6 @@ int32_t CBC_PDF417ScanningDecoder::adjustCodewordStartColumn(
int32_t correctedStartColumn = codewordStartColumn;
int32_t increment = leftToRight ? -1 : 1;
for (int32_t i = 0; i < 2; i++) {
- FX_BOOL l = image->Get(correctedStartColumn, imageRow);
while (((leftToRight && correctedStartColumn >= minColumn) ||
(!leftToRight && correctedStartColumn < maxColumn)) &&
leftToRight == image->Get(correctedStartColumn, imageRow)) {
@@ -672,8 +671,7 @@ CBC_CommonDecoderResult* CBC_PDF417ScanningDecoder::decodeCodewords(
return NULL;
}
int32_t numECCodewords = 1 << (ecLevel + 1);
- int32_t correctedErrorsCount =
- correctErrors(codewords, erasures, numECCodewords, e);
+ correctErrors(codewords, erasures, numECCodewords, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
verifyCodewordCount(codewords, numECCodewords, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp
index 51bfa32dd0..f504517d44 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPatternFinder.cpp
@@ -131,7 +131,6 @@ FX_FLOAT CBC_QRAlignmentPatternFinder::CrossCheckVertical(
int32_t centerJ,
int32_t maxCount,
int32_t originalStateCountTotal) {
- CBC_CommonBitMatrix* image = m_image;
int32_t maxI = m_image->GetHeight();
CFX_Int32Array stateCount;
stateCount.Copy(m_crossCheckStateCount);
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderDecoder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderDecoder.cpp
index e78d266277..78e7a89f18 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderDecoder.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderDecoder.cpp
@@ -83,7 +83,6 @@ CBC_CommonDecoderResult* CBC_QRCoderDecoder::Decode(CBC_CommonBitMatrix* bits,
totalBytes += ((CBC_QRDataBlock*)((*dataBlocks)[i]))->GetNumDataCodewords();
}
CFX_ByteArray resultBytes;
- int32_t resultOffset = 0;
for (int32_t j = 0; j < dataBlocks->GetSize(); j++) {
CBC_QRDataBlock* dataBlock = (CBC_QRDataBlock*)((*dataBlocks)[j]);
CFX_ByteArray* codewordBytes = dataBlock->GetCodewords();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
index 6488619ce1..bbdaa0b93b 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
@@ -776,7 +776,7 @@ void CBC_QRCoderEncoder::AppendKanjiBytes(const CFX_ByteString& content,
CBC_QRCoderBitVector* bits,
int32_t& e) {
CFX_ByteArray bytes;
- FX_DWORD value = 0, h = 0;
+ FX_DWORD value = 0;
for (int32_t i = 0; i < bytes.GetSize(); i += 2) {
value = (FX_DWORD)((uint8_t)(content[i] << 8) | (uint8_t)content[i + 1]);
if (value <= 0x9ffc && value >= 0x8140) {
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp
index 643b15bdfd..26180ceff4 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.cpp
@@ -114,7 +114,6 @@ void CBC_QRDecodedBitStreamParser::DecodeGBKSegment(CBC_CommonBitSource* bits,
int32_t count,
int32_t& e) {
CFX_ByteString buffer;
- int32_t offset = 0;
while (count > 0) {
int32_t twoBytes = bits->ReadBits(13, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);