diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-07 12:52:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-07 18:00:45 +0100 |
commit | e5e24bdc33723ed4e055a609a9574edb644d580f (patch) | |
tree | 26fd8e845ae6087d227dc61b6b979555520df9d9 /vcl/source/filter | |
parent | 7a9abd681b7fc5f84e81aded9085feb09743f385 (diff) |
coverity#1202907 Uninitialized scalar variable
Change-Id: I8cec0ea104fedfd7d89ac91a5b7f395246da8db0
Diffstat (limited to 'vcl/source/filter')
-rw-r--r-- | vcl/source/filter/sgvmain.cxx | 1 | ||||
-rw-r--r-- | vcl/source/filter/sgvmain.hxx | 39 |
2 files changed, 39 insertions, 1 deletions
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index 1785e693217a..2d6a29b43455 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -260,7 +260,6 @@ SvStream& ReadTextType(SvStream& rInp, TextType& rText) } SvStream& ReadBmapType(SvStream& rInp, BmapType& rBmap) { - memset((char*)&rBmap.Last, 0, BmapSize); rInp.Read((char*)&rBmap.Last,BmapSize); #if defined OSL_BIGENDIAN SWAPOBJK (rBmap); diff --git a/vcl/source/filter/sgvmain.hxx b/vcl/source/filter/sgvmain.hxx index 726815299ac4..cb93d7965bc1 100644 --- a/vcl/source/filter/sgvmain.hxx +++ b/vcl/source/filter/sgvmain.hxx @@ -29,6 +29,11 @@ struct PointType { sal_Int16 x; sal_Int16 y; + PointType() + : x(0) + , y(0) + { + } }; #define SgfDpmm 40 @@ -95,6 +100,16 @@ struct ObjAreaType { sal_uInt8 FDummy1; sal_Int16 FDummy2; sal_uInt16 FMuster; // [Index] incl. Invers, transparency + + ObjAreaType() + : FFarbe(0) + , FBFarbe(0) + , FIntens(0) + , FDummy1(0) + , FDummy2(0) + , FMuster(0) + { + } }; #define ObjTextTypeSize 64 @@ -138,6 +153,14 @@ public: PointType ObjMax; // XY maximum of the object sal_uInt8 Art; sal_uInt8 Layer; + ObjkType() + : Last(0) + , Next(0) + , MemSize(0) + , Art(0) + , Layer(0) + { + } friend SvStream& ReadObjkType(SvStream& rIStream, ObjkType& rObjk); friend bool ObjOverSeek(SvStream& rInp, ObjkType& rObjk); virtual void Draw(OutputDevice& rOut) SAL_OVERRIDE; @@ -270,6 +293,22 @@ public: bool LightOut; // brighten? (SD20) sal_uInt8 GrfFlg; // (SD20) 0=nSGF 1=Pcx 2=HPGL 4=Raw $FF=Undef (to fix DrawBmp) INetURLObject aFltPath; // for GraphicFilter + + BmapType() + : Flags(0) + , Reserve(0) + , DrehWink(0) + , Slant(0) + , Format(NoGraf) + , nPlanes(0) + , RawOut(false) + , InvOut(false) + , LightOut(false) + , GrfFlg(0) + { + memset(Filename, 0, sizeof(Filename)); + } + friend SvStream& ReadBmapType(SvStream& rIStream, BmapType& rBmap); virtual void Draw(OutputDevice& rOut) SAL_OVERRIDE; void SetPaths( const INetURLObject& rFltPath ); |