summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-02-25 12:08:02 -0800
committerLei Zhang <thestig@chromium.org>2016-02-25 12:08:02 -0800
commit6941d29a825a815bebf93e07c3f2e2274399c7a4 (patch)
tree222d611e79399d49dce45be9bbb1e0bd0efbfcb3 /xfa/src/fxbarcode
parent6b7b5a52f42aa9b37be5307915885d5f4566c326 (diff)
downloadpdfium-6941d29a825a815bebf93e07c3f2e2274399c7a4.tar.xz
Remove set but unsed variables.
And other nearby dead code. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1740613002 .
Diffstat (limited to 'xfa/src/fxbarcode')
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_C40Encoder.cpp2
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp1
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_TextEncoder.cpp2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp2
7 files changed, 2 insertions, 11 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_C40Encoder.cpp b/xfa/src/fxbarcode/datamatrix/BC_C40Encoder.cpp
index a1be45e291..01ececb4b7 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_C40Encoder.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_C40Encoder.cpp
@@ -138,7 +138,7 @@ int32_t CBC_C40Encoder::encodeChar(FX_WCHAR c, CFX_WideString& sb, int32_t& e) {
} else if ((c >= 'A') && (c <= 'Z')) {
sb += (FX_WCHAR)(c - 65 + 14);
return 1;
- } else if ((c >= '\0') && (c <= 0x1f)) {
+ } else if (c <= 0x1f) {
sb += (FX_WCHAR)'\0';
sb += c;
return 2;
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp
index 02a202b27d..79e47177a6 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp
@@ -83,7 +83,6 @@ CBC_CommonDecoderResult* CBC_DataMatrixDecodedBitStreamParser::Decode(
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
break;
default:
- NULL;
e = BCExceptionFormatException;
return NULL;
}
diff --git a/xfa/src/fxbarcode/datamatrix/BC_TextEncoder.cpp b/xfa/src/fxbarcode/datamatrix/BC_TextEncoder.cpp
index 61e8f7dec2..ec340f30e7 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_TextEncoder.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_TextEncoder.cpp
@@ -50,7 +50,7 @@ int32_t CBC_TextEncoder::encodeChar(FX_WCHAR c,
sb += (FX_WCHAR)(c - 97 + 14);
return 1;
}
- if (c >= '\0' && c <= 0x1f) {
+ if (c <= 0x1f) {
sb += (FX_WCHAR)'\0';
sb += c;
return 2;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
index 5f0ad98d65..689cf4c87e 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp
@@ -67,7 +67,6 @@ CFX_ByteString CBC_OnedCode39Reader::DecodeRow(int32_t rowNumber,
CFX_Int32Array counters;
counters.SetSize(9);
FX_CHAR decodedChar;
- int32_t lastStart;
do {
RecordPattern(row, nextStart, &counters, e);
BC_EXCEPTION_CHECK_ReturnValue(e, "");
@@ -79,7 +78,6 @@ CFX_ByteString CBC_OnedCode39Reader::DecodeRow(int32_t rowNumber,
decodedChar = PatternToChar(pattern, e);
BC_EXCEPTION_CHECK_ReturnValue(e, "");
result += decodedChar;
- lastStart = nextStart;
for (int32_t i = 0; i < counters.GetSize(); i++) {
nextStart += counters[i];
}
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index de71b2074a..1a026da98f 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -207,7 +207,6 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
device->FillRect(&re, m_backgroundColor);
}
FX_FLOAT blank = 0.0;
- FX_FLOAT charsWidth = 0;
iLen = tempStr.GetLength();
if (pOutBitmap == NULL) {
strWidth = (int32_t)(strWidth * m_outputHScale);
@@ -239,7 +238,6 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
}
tempStr = str.Mid(7, 6);
iLen = tempStr.GetLength();
- charsWidth = 0.0f;
CalcTextInfo(tempStr, pCharPos + 7, m_pFont, (FX_FLOAT)strWidth, iFontSize,
blank);
if (pOutBitmap) {
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index 61fe75aae3..9981575112 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -182,7 +182,6 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents,
if (pOutBitmap) {
geBitmap.Attach(pOutBitmap);
}
- FX_FLOAT charsWidth = 0;
int32_t iFontSize = (int32_t)fabs(m_fFontSize);
int32_t iTextHeight = iFontSize + 1;
if (pOutBitmap == NULL) {
@@ -233,7 +232,6 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents,
}
tempStr = str.Mid(4, 4);
iLen = tempStr.GetLength();
- charsWidth = 0.0f;
CalcTextInfo(tempStr, pCharPos + 4, m_pFont, (FX_FLOAT)strWidth, iFontSize,
blank);
if (pOutBitmap) {
diff --git a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp
index 55c50318a5..fe4a8e7824 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp
@@ -130,7 +130,6 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
if (pOutBitmap) {
geBitmap.Attach(pOutBitmap);
}
- FX_FLOAT charsWidth = 0;
iLen = tempStr.GetLength();
int32_t iFontSize = (int32_t)fabs(m_fFontSize);
int32_t iTextHeight = iFontSize + 1;
@@ -200,7 +199,6 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
}
tempStr = str.Mid(6, 5);
iLen = tempStr.GetLength();
- charsWidth = 0.0f;
CalcTextInfo(tempStr, pCharPos + 6, m_pFont, strWidth, iFontSize, blank);
if (pOutBitmap) {
FX_RECT rect2(0, 0, (int)strWidth, iTextHeight);