summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_Context.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-21 11:20:44 -0700
committerWei Li <weili@chromium.org>2016-03-21 11:20:44 -0700
commitd4e8f1222ca17b57ac74019b2fc3706e1192645c (patch)
tree0dd5e1627fd684205631f875cbf5946178177766 /core/fxcodec/jbig2/JBig2_Context.cpp
parent34fa8d90ae2f60fae219e4dbeff14c053d2e8eef (diff)
downloadpdfium-d4e8f1222ca17b57ac74019b2fc3706e1192645c.tar.xz
Re-enable several MSVC warnings
Re-enable the following warnings: 4245: signed/unsigned conversion mismatch; 4310: cast may truncate data; 4389: operator on signed/unsigned mismatch; 4701: use potentially uninitialized local variable; 4706: assignment within conditional expression Clean up the code to avoid those warnings. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1801383002 .
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Context.cpp')
-rw-r--r--core/fxcodec/jbig2/JBig2_Context.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp
index 89157b9bf1..805a102c74 100644
--- a/core/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/fxcodec/jbig2/JBig2_Context.cpp
@@ -201,7 +201,7 @@ int32_t CJBig2_Context::getFirstPage(uint8_t* pBuf,
}
int32_t CJBig2_Context::Continue(IFX_Pause* pPause) {
m_ProcessingStatus = FXCODEC_STATUS_DECODE_READY;
- int32_t nRet;
+ int32_t nRet = 0;
if (m_PauseStep <= 1) {
nRet = decode_EmbedOrgnazation(pPause);
} else if (m_PauseStep == 2) {
@@ -683,14 +683,14 @@ int32_t CJBig2_Context::parseTextRegion(CJBig2_Segment* pSegment) {
}
pTRD->SBRTEMPLATE = (wFlags >> 15) & 0x0001;
- uint8_t cSBHUFFFS;
- uint8_t cSBHUFFDS;
- uint8_t cSBHUFFDT;
- uint8_t cSBHUFFRDW;
- uint8_t cSBHUFFRDH;
- uint8_t cSBHUFFRDX;
- uint8_t cSBHUFFRDY;
- uint8_t cSBHUFFRSIZE;
+ uint8_t cSBHUFFFS = 0;
+ uint8_t cSBHUFFDS = 0;
+ uint8_t cSBHUFFDT = 0;
+ uint8_t cSBHUFFRDW = 0;
+ uint8_t cSBHUFFRDH = 0;
+ uint8_t cSBHUFFRDX = 0;
+ uint8_t cSBHUFFRDY = 0;
+ uint8_t cSBHUFFRSIZE = 0;
if (pTRD->SBHUFF == 1) {
if (m_pStream->readShortInteger(&wFlags) != 0)
return JBIG2_ERROR_TOO_SHORT;