From 65af1f309883f4c706f0154b17149ac38f0760ef Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 8 Feb 2014 12:44:57 +0000 Subject: coverity#1169866 Uninitialized scalar variable Change-Id: I0259c798bfff5034059fd3ef6a0463e5fbce409b --- vcl/source/filter/sgfbram.cxx | 5 +++++ vcl/source/filter/sgfbram.hxx | 1 + 2 files changed, 6 insertions(+) diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx index 94fd72ada756..fb028d7796fd 100644 --- a/vcl/source/filter/sgfbram.cxx +++ b/vcl/source/filter/sgfbram.cxx @@ -57,6 +57,11 @@ bool SgfHeader::ChkMagic() sal_uInt32 SgfHeader::GetOffset() { return sal_uInt32(OfsLo)+0x00010000*sal_uInt32(OfsHi); } +SgfEntry::SgfEntry() +{ + memset( this, 0, sizeof( SgfEntry ) ); +} + SvStream& ReadSgfEntry(SvStream& rIStream, SgfEntry& rEntr) { rIStream.Read((char*)&rEntr.Typ,SgfEntrySize); diff --git a/vcl/source/filter/sgfbram.hxx b/vcl/source/filter/sgfbram.hxx index 183eddf90e87..72f4cec81a7a 100644 --- a/vcl/source/filter/sgfbram.hxx +++ b/vcl/source/filter/sgfbram.hxx @@ -73,6 +73,7 @@ public: sal_uInt32 GetOffset(); friend SvStream& ReadSgfEntry(SvStream& rIStream, SgfEntry& rEntr); + SgfEntry(); }; #define SgfVectorSize 10 -- cgit v1.2.3