diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-01-31 23:07:30 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2011-01-31 23:07:30 +0100 |
commit | 78d248934f173431001a418b7c7be908cb7727c7 (patch) | |
tree | 648731c8df4cf623f726a60d19947327cfd29008 /sot | |
parent | fix branching on un-initialized memory in some cases (diff) | |
download | core-78d248934f173431001a418b7c7be908cb7727c7.tar.gz core-78d248934f173431001a418b7c7be908cb7727c7.zip |
Some cppcheck cleaning
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/stgavl.cxx | 1 | ||||
-rw-r--r-- | sot/source/sdstor/stgstrms.cxx | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx index 643c7893f15a..a2e4a9162e02 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 4974879e5d5e..a9275e307fc6 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 ) { |