From 545c6e9d4fa3209eefd3867077c5fe820f0675d0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 19 Jan 2017 10:41:38 +0000 Subject: clear ARRAY_VS_SINGLETON coverity warnings experiment to see if this clears them Change-Id: I91a74e06f621d3012b564cad87586ba74b0367ca --- basic/source/runtime/runtime.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'basic/source/runtime/runtime.cxx') diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 38d9a1eb4c77..e4febca102ea 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -639,12 +639,12 @@ void SbiRuntime::SetParameters( SbxArray* pParams ) SbxDimArray* pArray = new SbxDimArray( SbxVARIANT ); sal_uInt16 nParamArrayParamCount = nParamCount - i; pArray->unoAddDim( 0, nParamArrayParamCount - 1 ); - for( sal_uInt16 j = i ; j < nParamCount ; j++ ) + for (sal_uInt16 j = i; j < nParamCount ; ++j) { SbxVariable* v = pParams->Get( j ); - short nDimIndex = j - i; - // coverity[callee_ptr_arith] - pArray->Put( v, &nDimIndex ); + short aDimIndex[1]; + aDimIndex[0] = j - i; + pArray->Put(v, aDimIndex); } SbxVariable* pArrayVar = new SbxVariable( SbxVARIANT ); pArrayVar->SetFlag( SbxFlagBits::ReadWrite ); -- cgit