summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-05-13 20:56:38 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-14 07:42:58 +0000
commitb00d1e37c8d178f8199a45d1c9f08cae6bcef698 (patch)
tree6201e2c33c79aa3f8d499eaf08024ec5dc6ba2cd
parent442387bdf493aa6a752fd2531507625dc9e5a4fc (diff)
cppcheck: uninitialised members in vcl
and remove clear() on std::vector types in ctors Change-Id: I8e239676d46e30049d4d5886a5b8de99cadd3f45 Reviewed-on: https://gerrit.libreoffice.org/24983 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--vcl/quartz/salbmp.cxx12
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx1
-rw-r--r--vcl/source/fontsubset/cff.cxx12
-rw-r--r--vcl/source/gdi/pdffontcache.hxx6
-rw-r--r--vcl/win/gdi/gdiimpl.cxx4
5 files changed, 23 insertions, 12 deletions
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 4a1a9f00404a..48906a399429 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -445,7 +445,8 @@ private:
public:
explicit ImplPixelFormat8( const BitmapPalette& rPalette )
- : mrPalette( rPalette )
+ : pData(nullptr)
+ , mrPalette(rPalette)
{
}
virtual void StartLine( sal_uInt8* pLine ) override { pData = pLine; }
@@ -476,7 +477,10 @@ private:
public:
explicit ImplPixelFormat4( const BitmapPalette& rPalette )
- : mrPalette( rPalette )
+ : pData(nullptr)
+ , mrPalette(rPalette)
+ , mnX(0)
+ , mnShift(0)
{
}
virtual void SkipPixel( sal_uInt32 nPixel ) override
@@ -521,7 +525,9 @@ private:
public:
explicit ImplPixelFormat1( const BitmapPalette& rPalette )
- : mrPalette( rPalette )
+ : pData(nullptr)
+ , mrPalette(rPalette)
+ , mnX(0)
{
}
virtual void SkipPixel( sal_uInt32 nPixel ) override
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index b759697ce4ef..8feb82d8a2ab 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -151,6 +151,7 @@ WMFWriter::WMFWriter()
, eDstTextAlign(ALIGN_BASELINE)
, eDstHorTextAlign(W_TA_LEFT)
, bDstIsClipping(false)
+ , bHandleAllocated{}
, nDstPenHandle(0)
, nDstFontHandle(0)
, nDstBrushHandle(0)
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index ac3bf78bb098..74725eab8990 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -424,8 +424,11 @@ CffSubsetterContext::CffSubsetterContext( const U8* pBasePtr, int nBaseLen)
, mpCharStringOps(nullptr)
, mpCharStringEscs(nullptr)
, mnStackIdx(0)
+ , mnValStack{}
+ , mnTransVals{}
, mnHintSize(0)
, mnHorzHintSize(0)
+ , mnHintStack{}
, maCharWidth(-1)
{
// setCharStringType( 1);
@@ -1406,12 +1409,6 @@ CffLocal::CffLocal()
, mnLangGroup( 0)
, mbForceBold( false)
{
- maStemSnapH.clear();
- maStemSnapV.clear();
- maBlueValues.clear();
- maOtherBlues.clear();
- maFamilyBlues.clear();
- maFamilyOtherBlues.clear();
}
CffGlobal::CffGlobal()
@@ -1434,8 +1431,6 @@ CffGlobal::CffGlobal()
, mnFullNameSID( 0)
, mnFamilyNameSID( 0)
{
- maFontBBox.clear();
- // TODO; maFontMatrix.clear();
}
bool CffSubsetterContext::initialCffRead()
@@ -1734,6 +1729,7 @@ public:
Type1Emitter::Type1Emitter( FILE* pOutFile, bool bPfbSubset)
: mpFileOut( pOutFile)
, mbCloseOutfile( false)
+, maBuffer{}
, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed
, mpPtr( maBuffer)
, mbPfbSubset( bPfbSubset)
diff --git a/vcl/source/gdi/pdffontcache.hxx b/vcl/source/gdi/pdffontcache.hxx
index 8bca64ebc83e..f6686296bbd0 100644
--- a/vcl/source/gdi/pdffontcache.hxx
+++ b/vcl/source/gdi/pdffontcache.hxx
@@ -38,7 +38,11 @@ namespace vcl
std::type_info* m_typeFontFace;
FontIdentifier( const PhysicalFontFace*, bool bVertical );
- FontIdentifier() : m_nFontId(0), m_bVertical( false ) {}
+ FontIdentifier()
+ : m_nFontId(0)
+ , m_bVertical(false)
+ , m_typeFontFace(nullptr)
+ {}
// Less than needed for std::set and std::map
bool operator<( const FontIdentifier& rRight ) const
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index 817b062b34a7..8a43898c95b6 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -263,7 +263,11 @@ int ImplIsPaletteEntry( BYTE nRed, BYTE nGreen, BYTE nBlue )
WinSalGraphicsImpl::WinSalGraphicsImpl(WinSalGraphics& rParent):
mrParent(rParent),
mbXORMode(false),
+ mbPen(false),
mhPen(0),
+ mbStockPen(false),
+ mbBrush(false),
+ mbStockBrush(false),
mhBrush(0)
{
}