diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-26 10:03:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-26 16:29:13 +0100 |
commit | 2daceb87b9e14868833fa746ec6efe93fc2dfadb (patch) | |
tree | 3159b323b9d6f8fec828e8c449b774945db4c10a /basic | |
parent | cd29cab883a6a7a0e028ca6756daa2f3cc8d51f6 (diff) |
clang: Uninitialized argument value
Change-Id: Id65c5815185cf022171e3523c6ad92545830104c
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/sbx/sbxarray.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index 96f1bbcf01e7..9824098a6062 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -680,6 +680,8 @@ bool SbxDimArray::GetDim( short n, short& rlb, short& rub ) const { sal_Int32 rlb32, rub32; bool bRet = GetDim32( n, rlb32, rub32 ); + rub = (short)rub32; + rlb = (short)rlb32; if( bRet ) { if( rlb32 < -SBX_MAXINDEX || rub32 > SBX_MAXINDEX ) @@ -687,8 +689,6 @@ bool SbxDimArray::GetDim( short n, short& rlb, short& rub ) const SetError( SbxERR_BOUNDS ); return false; } - rub = (short)rub32; - rlb = (short)rlb32; } return bRet; } @@ -753,9 +753,7 @@ void SbxDimArray::Put32( SbxVariable* p, const sal_Int32* pIdx ) SbxArray::Put32( p, Offset32( pIdx ) ); } - // Element-Number with the help of Parameter-Array - sal_uInt32 SbxDimArray::Offset32( SbxArray* pPar ) { #ifndef DISABLE_SCRIPTING @@ -793,7 +791,7 @@ bool SbxDimArray::LoadData( SvStream& rStrm, sal_uInt16 nVer ) rStrm.ReadInt16( nDimension ); for( short i = 0; i < nDimension && rStrm.GetError() == SVSTREAM_OK; i++ ) { - sal_Int16 lb, ub; + sal_Int16 lb(0), ub(0); rStrm.ReadInt16( lb ).ReadInt16( ub ); AddDim( lb, ub ); } @@ -807,7 +805,7 @@ bool SbxDimArray::StoreData( SvStream& rStrm ) const { short lb, ub; GetDim( i, lb, ub ); - rStrm.WriteInt16( (sal_Int16) lb ).WriteInt16( (sal_Int16) ub ); + rStrm.WriteInt16( lb ).WriteInt16( ub ); } return SbxArray::StoreData( rStrm ); } |