From b3e332b4a70658548c4560c2bc460143548559df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Apr 2014 15:50:59 +0100 Subject: [PATCH] coverity#738574 Uninitialized scalar field Change-Id: Ia7cca6e2a2bc3240a32509697a999461491a2747 --- cppcanvas/source/mtfrenderer/emfplus.cxx | 26 ++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index a34b4d31cf0b..5774eb6b42d1 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -769,15 +769,29 @@ namespace cppcanvas EMFPCustomLineCap *customEndCap; public: - EMFPPen () : EMFPBrush () + EMFPPen () + : EMFPBrush() + , width(0.0) + , startCap(0) + , endCap(0) + , lineJoin(0) + , mitterLimit(0.0) + , dashStyle(0) + , dashCap(0) + , dashOffset(0.0) + , dashPatternLen(0) + , dashPattern(NULL) + , alignment(0) + , compoundArrayLen(0) + , compoundArray(NULL) + , customStartCapLen(0) + , customStartCap(NULL) + , customEndCapLen(0) + , customEndCap(NULL) { - dashPattern = NULL; - compoundArray = NULL; - customStartCap = NULL; - customEndCap = NULL; } - virtual ~EMFPPen () + virtual ~EMFPPen() { delete[] dashPattern; delete[] compoundArray;