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/fxge/win32/fx_win32_gdipext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fxge/win32/fx_win32_gdipext.cpp') diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp index ce181bb448..2fdfa3a8c7 100644 --- a/core/fxge/win32/fx_win32_gdipext.cpp +++ b/core/fxge/win32/fx_win32_gdipext.cpp @@ -982,7 +982,7 @@ static GpPen* _GdipCreatePen(const CFX_GraphStateData* pGraphState, } GpPen* pPen = NULL; CallFunc(GdipCreatePen1)((ARGB)argb, width, UnitWorld, &pPen); - LineCap lineCap; + LineCap lineCap = LineCapFlat; DashCap dashCap = DashCapFlat; FX_BOOL bDashExtend = FALSE; switch (pGraphState->m_LineCap) { @@ -1000,7 +1000,7 @@ static GpPen* _GdipCreatePen(const CFX_GraphStateData* pGraphState, break; } CallFunc(GdipSetPenLineCap197819)(pPen, lineCap, lineCap, dashCap); - LineJoin lineJoin; + LineJoin lineJoin = LineJoinMiterClipped; switch (pGraphState->m_LineJoin) { case CFX_GraphStateData::LineJoinMiter: lineJoin = LineJoinMiterClipped; -- cgit v1.2.3