From 5570d23890cc7bae4903a29fbcf8ac543ba1a2c7 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 5 Nov 2015 08:46:13 -0800 Subject: Fix XFA compilation warnings, part 2 Mostly unused variables, unused private members, or initialization order. Added a few missing initializers for pointer members along the way. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1414903004 . --- xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp | 13 ++++++------- .../fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp | 2 +- xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp | 21 +++++++++++++++------ 3 files changed, 22 insertions(+), 14 deletions(-) (limited to 'xfa/src/fxbarcode') diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp index 43bd696379..99484493f3 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.cpp @@ -37,15 +37,14 @@ const int32_t CBC_OnedCode39Reader::CHARACTER_ENCODINGS[44] = { 0x085, 0x184, 0x0C4, 0x094, 0x0A8, 0x0A2, 0x08A, 0x02A}; const int32_t CBC_OnedCode39Reader::ASTERISK_ENCODING = 0x094; CBC_OnedCode39Reader::CBC_OnedCode39Reader() - : m_extendedMode(FALSE), m_usingCheckDigit(FALSE) {} -CBC_OnedCode39Reader::CBC_OnedCode39Reader(FX_BOOL usingCheckDigit) { - m_usingCheckDigit = usingCheckDigit; - m_extendedMode = FALSE; + : m_usingCheckDigit(FALSE), m_extendedMode(FALSE) { +} +CBC_OnedCode39Reader::CBC_OnedCode39Reader(FX_BOOL usingCheckDigit) + : m_usingCheckDigit(usingCheckDigit), m_extendedMode(FALSE) { } CBC_OnedCode39Reader::CBC_OnedCode39Reader(FX_BOOL usingCheckDigit, - FX_BOOL extendedMode) { - m_extendedMode = extendedMode; - m_usingCheckDigit = usingCheckDigit; + FX_BOOL extendedMode) + : m_usingCheckDigit(usingCheckDigit), m_extendedMode(extendedMode) { } CBC_OnedCode39Reader::~CBC_OnedCode39Reader() {} CFX_ByteString CBC_OnedCode39Reader::DecodeRow(int32_t rowNumber, diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp index d70dbb12e4..f61c523f8a 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp @@ -25,7 +25,7 @@ #include "BC_PDF417CodewordDecoder.h" #define SYMBOL_TABLE_Length 2787 #define Float_MAX_VALUE 2147483647 -FX_FLOAT CBC_PDF417CodewordDecoder::RATIOS_TABLE[2787][8] = {0}; +FX_FLOAT CBC_PDF417CodewordDecoder::RATIOS_TABLE[2787][8] = {{0}}; CBC_PDF417CodewordDecoder::CBC_PDF417CodewordDecoder() {} CBC_PDF417CodewordDecoder::~CBC_PDF417CodewordDecoder() {} void CBC_PDF417CodewordDecoder::Initialize() { diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp index 83e64db0a0..3c663c7b69 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp @@ -28,14 +28,23 @@ #include "BC_QRCoderMatrixUtil.h" #include "BC_QRCoderBitVector.h" const int32_t CBC_QRCoderMatrixUtil::POSITION_DETECTION_PATTERN[7][7] = { - 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, - 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}; + {1, 1, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 1}, + {1, 0, 1, 1, 1, 0, 1}, + {1, 0, 1, 1, 1, 0, 1}, + {1, 0, 1, 1, 1, 0, 1}, + {1, 0, 0, 0, 0, 0, 1}, + {1, 1, 1, 1, 1, 1, 1}}; const int32_t CBC_QRCoderMatrixUtil::HORIZONTAL_SEPARATION_PATTERN[1][8] = { - 0, 0, 0, 0, 0, 0, 0, 0}; -const int32_t CBC_QRCoderMatrixUtil::VERTICAL_SEPARATION_PATTERN[7][1] = { - 0, 0, 0, 0, 0, 0, 0}; + {0, 0, 0, 0, 0, 0, 0, 0}}; +const int32_t CBC_QRCoderMatrixUtil::VERTICAL_SEPARATION_PATTERN[7][1] = + {{0}, {0}, {0}, {0}, {0}, {0}, {0}}; const int32_t CBC_QRCoderMatrixUtil::POSITION_ADJUSTMENT_PATTERN[5][5] = { - 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1}; + {1, 1, 1, 1, 1}, + {1, 0, 0, 0, 1}, + {1, 0, 1, 0, 1}, + {1, 0, 0, 0, 1}, + {1, 1, 1, 1, 1}}; const int32_t CBC_QRCoderMatrixUtil::POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[40][7] = { -- cgit v1.2.3