From b678dee6a856e3c0bd4e969db76f6a19970e5343 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Sat, 8 Sep 2018 10:44:10 +0200 Subject: cppcheck: variableScope in basic use a range based loop in one case Change-Id: I3d3acc35739634797e2b6e4d1cc2909b3fe33750 Reviewed-on: https://gerrit.libreoffice.org/60188 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/classes/sbunoobj.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'basic/source/classes/sbunoobj.cxx') diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 376bae1217b7..a2aebb7cd018 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2150,7 +2150,6 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) sal_uInt32 nParamCount = pParams ? (static_cast(pParams->Count()) - 1) : 0; Sequence args; bool bOutParams = false; - sal_uInt32 i; if( !bInvocation && mxUnoAccess.is() ) { @@ -2173,7 +2172,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { // Check types bool bError = false; - for( i = nParamCount ; i < nUnoParamCount ; i++ ) + for( sal_uInt32 i = nParamCount ; i < nUnoParamCount ; i++ ) { const ParamInfo& rInfo = pParamInfos[i]; const Reference< XIdlClass >& rxClass = rInfo.aType; @@ -2192,7 +2191,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { args.realloc( nAllocParamCount ); Any* pAnyArgs = args.getArray(); - for( i = 0 ; i < nParamCount ; i++ ) + for( sal_uInt32 i = 0 ; i < nParamCount ; i++ ) { const ParamInfo& rInfo = pParamInfos[i]; const Reference< XIdlClass >& rxClass = rInfo.aType; -- cgit