[Libreoffice-commits] .: sot/source

Julien Nabet serval2412 at kemper.freedesktop.org
Mon Jan 31 14:07:49 PST 2011


 sot/source/sdstor/stgavl.cxx   |    1 +
 sot/source/sdstor/stgstrms.cxx |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit d535b736f8f864f7fe6cdd23ef339af8038ec795
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Jan 31 23:07:30 2011 +0100

    Some cppcheck cleaning

diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx
index c8a8f29..41ce4a5 100644
--- a/sot/source/sdstor/stgavl.cxx
+++ b/sot/source/sdstor/stgavl.cxx
@@ -380,6 +380,7 @@ StgAvlIterator::StgAvlIterator( StgAvlNode* p )
 {
     pRoot = p;
     nCount = 0;
+    nCur = 0;
     if( p )
         p->StgEnum( nCount );
 }
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index d94e92e..19c8918 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -830,12 +830,12 @@ INT32 StgDataStrm::Read( void* pBuf, INT32 n )
     while( n )
     {
         short nBytes = nPageSize - nOffset;
-        short nRes;
         StgPage* pPg;
         if( (INT32) nBytes > n )
             nBytes = (short) n;
         if( nBytes )
         {
+            short nRes;
             void *p = (BYTE *) pBuf + nDone;
             if( nBytes == nPageSize )
             {
@@ -888,12 +888,12 @@ INT32 StgDataStrm::Write( const void* pBuf, INT32 n )
     while( n )
     {
         short nBytes = nPageSize - nOffset;
-        short nRes;
         StgPage* pPg;
         if( (INT32) nBytes > n )
             nBytes = (short) n;
         if( nBytes )
         {
+            short nRes;
             const void *p = (const BYTE *) pBuf + nDone;
             if( nBytes == nPageSize )
             {


More information about the Libreoffice-commits mailing list