[Libreoffice-commits] core.git: 2 commits - basic/source filter/source vcl/source

Julien Nabet serval2412 at yahoo.fr
Tue Feb 12 02:56:09 PST 2013


 basic/source/comp/sbcomp.cxx                  |    1 +
 filter/source/graphicfilter/icgm/cgmtypes.hxx |    4 ++--
 vcl/source/filter/igif/gifread.cxx            |    6 ++++--
 3 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 39e755dd5c06823f4abda1453a195fdac74ae995
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Feb 12 11:38:53 2013 +0100

    Some cppcheck cleaning
    
    Change-Id: I65b2b9b0001843b2153d228b994f08f5b5565880

diff --git a/filter/source/graphicfilter/icgm/cgmtypes.hxx b/filter/source/graphicfilter/icgm/cgmtypes.hxx
index ff3482f..b6c6e37 100644
--- a/filter/source/graphicfilter/icgm/cgmtypes.hxx
+++ b/filter/source/graphicfilter/icgm/cgmtypes.hxx
@@ -24,7 +24,7 @@ struct FloatPoint
 {
         double          X;
         double          Y;
-        FloatPoint(){};
+        FloatPoint():X(0), Y(0){};
         FloatPoint( const double& rX, const double& rY ) { X = rX, Y = rY; };
 };
 
@@ -34,7 +34,7 @@ struct FloatRect
         double          Top;
         double          Right;
         double          Bottom;
-        FloatRect(){};
+        FloatRect():Left(0), Top(0), Right(0), Bottom(0){};
         FloatRect( const FloatPoint& rTopLeft, const FloatPoint& rBottomRight )
         {
             Left = rTopLeft.X;
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index 63bce66..011be8c 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -37,8 +37,10 @@ GIFReader::GIFReader( SvStream& rStm ) :
             aGPalette       ( 256 ),
             aLPalette       ( 256 ),
             rIStm           ( rStm ),
+            pDecomp         ( NULL ),
             pAcc8           ( NULL ),
             pAcc1           ( NULL ),
+            nYAcc           ( 0 ),
             nLastPos        ( rStm.Tell() ),
             nLogWidth100    ( 0UL ),
             nLogHeight100   ( 0UL ),
@@ -455,7 +457,7 @@ void GIFReader::FillImages( HPBYTE pBytes, sal_uLong nCount )
         {
             if( bInterlaced )
             {
-                long nT1, nT2;
+                long nT1;
 
                 // falls Interlaced, werden die Zeilen kopiert
                 if( nLastInterCount )
@@ -493,7 +495,7 @@ void GIFReader::FillImages( HPBYTE pBytes, sal_uLong nCount )
 
                 if( nT1 >= nImageHeight )
                 {
-                    nT2 = nImageY - ( ( nImageHeight + 7 ) >> 3 );
+                    long nT2 = nImageY - ( ( nImageHeight + 7 ) >> 3 );
                     nT1 = ( nT2 << 3 ) + 4;
                     nLastInterCount = 3;
 
commit fc27fec0543009dbb6c6ca002283564215aae4b1
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Feb 12 11:37:53 2013 +0100

    Fix Variable 'TimeBuffer' is not assigned a value
    
    See http://nabble.documentfoundation.org/Cppcheck-TimeBuffer-is-not-assigned-a-value-in-basic-module-td4036591.html
    
    Change-Id: I2d67cecf3530301d49c43bbe397c5e975b2816b0

diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index 8f1f081..85d91ae 100644
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -598,6 +598,7 @@ void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl )
         bSTMT = true;
     }
     char TimeBuffer[200];
+    memset (TimeBuffer, 0, size(TimeBuffer));
 #ifdef DBG_TRACE_PROFILING
     if( bPrintTimeStamp )
     {


More information about the Libreoffice-commits mailing list