From d4e8f1222ca17b57ac74019b2fc3706e1192645c Mon Sep 17 00:00:00 2001 From: Wei Li Date: Mon, 21 Mar 2016 11:20:44 -0700 Subject: 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 . --- core/fxcodec/jbig2/JBig2_Context.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'core/fxcodec/jbig2/JBig2_Context.cpp') 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; -- cgit v1.2.3