From f147b160aef1735d34c488353a7d4b875788a7e1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 11 Feb 2020 15:56:21 +0200 Subject: clang-analyzer-deadcode.DeadStores Change-Id: Ifa384933569b27d0d08eb479bb95b799163ae386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88450 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/classes/sbunoobj.cxx | 6 +++--- basic/source/runtime/methods.cxx | 2 +- basic/source/sbx/sbxscan.cxx | 8 ++------ 3 files changed, 6 insertions(+), 10 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index ab3d5e54be40..4ba943acaf05 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4661,9 +4661,9 @@ void SbUnoStructRefObject::initMemberCache() return; typelib_TypeDescription * pTD = nullptr; maMemberInfo.getType().getDescription(&pTD); - typelib_CompoundTypeDescription * pCompTypeDescr = reinterpret_cast(pTD); - for ( pCompTypeDescr = reinterpret_cast(pTD); pCompTypeDescr; - pCompTypeDescr = pCompTypeDescr->pBaseTypeDescription ) + for ( typelib_CompoundTypeDescription * pCompTypeDescr = reinterpret_cast(pTD); + pCompTypeDescr; + pCompTypeDescr = pCompTypeDescr->pBaseTypeDescription ) { typelib_TypeDescriptionReference ** ppTypeRefs = pCompTypeDescr->ppTypeRefs; rtl_uString ** ppNames = pCompTypeDescr->ppMemberNames; diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 048fa1a8bb64..8543c0817762 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -3389,7 +3389,7 @@ void SbRtl_FormatNumber(StarBASIC*, SbxArray& rPar, bool) if (nNumDigitsAfterDecimal > 0) { - sal_Int32 nActualDigits = nNumDigitsAfterDecimal; + sal_Int32 nActualDigits; const sal_Int32 nSepPos = aResult.indexOf(decSep); if (nSepPos == -1) nActualDigits = 0; diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index e264f527c94b..24e3dba5ea35 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -310,8 +310,7 @@ static const double roundArray[] = { |* */ -static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth, - sal_Unicode cForceThousandSep ) +static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth ) { short nExp = 0; @@ -321,8 +320,6 @@ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth, sal_Unicode cDecimalSep, cThousandSep, cDecimalSepAlt; ImpGetIntntlSep( cDecimalSep, cThousandSep, cDecimalSepAlt ); - if( cForceThousandSep ) - cThousandSep = cForceThousandSep; // compute exponent nExp = 0; @@ -442,8 +439,7 @@ void ImpCvtNum( double nNum, short nPrec, OUString& rRes, bool bCoreString ) *p++ = '-'; } double dMaxNumWithoutExp = (nPrec == 6) ? 1E6 : 1E14; - myftoa( nNum, p, nPrec,( nNum &&( nNum < 1E-1 || nNum >= dMaxNumWithoutExp ) ) ? 4:0, - cDecimalSep ); + myftoa( nNum, p, nPrec,( nNum &&( nNum < 1E-1 || nNum >= dMaxNumWithoutExp ) ) ? 4:0 ); // remove trailing zeros for( p = cBuf; *p &&( *p != 'E' ); p++ ) {} q = p; p--; -- cgit