diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-01-21 11:34:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-21 14:22:31 +0000 |
commit | 679ca2901460d55bbfe31515c60c6f996614f245 (patch) | |
tree | a3219bca1d1226e4e7b123a114cee52ee1186bf7 | |
parent | Remove old RCS lines. (diff) | |
download | core-679ca2901460d55bbfe31515c60c6f996614f245.tar.gz core-679ca2901460d55bbfe31515c60c6f996614f245.zip |
cppcheck: misc scope and unused variables
-rw-r--r-- | sal/rtl/source/hash.cxx | 3 | ||||
-rw-r--r-- | sal/rtl/source/math.cxx | 2 | ||||
-rw-r--r-- | sal/textenc/tcvtmb.c | 3 |
3 files changed, 3 insertions, 5 deletions
diff --git a/sal/rtl/source/hash.cxx b/sal/rtl/source/hash.cxx index 6e8496875dd5..4e03dfc2a6d7 100644 --- a/sal/rtl/source/hash.cxx +++ b/sal/rtl/source/hash.cxx @@ -113,10 +113,9 @@ rtl_str_hash_insert_nonequal (StringHashTable *pHash, { sal_uInt32 nHash = hashString (pString); sal_uInt32 n; - rtl_uString *pHashStr; n = nHash % pHash->nSize; - while ((pHashStr = pHash->pData[n]) != NULL) { + while (pHash->pData[n] != NULL) { n++; if (n >= pHash->nSize) n = 0; diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx index 3c0d5ef48b53..8f949b3bf3d8 100644 --- a/sal/rtl/source/math.cxx +++ b/sal/rtl/source/math.cxx @@ -1224,11 +1224,11 @@ double SAL_CALL rtl_math_erfc( double x ) SAL_THROW_EXTERN_C() */ double SAL_CALL rtl_math_asinh( double fX ) SAL_THROW_EXTERN_C() { - double fSign = 1.0; if ( fX == 0.0 ) return 0.0; else { + double fSign = 1.0; if ( fX < 0.0 ) { fX = - fX; diff --git a/sal/textenc/tcvtmb.c b/sal/textenc/tcvtmb.c index 568fdd0762b7..e0936979eb19 100644 --- a/sal/textenc/tcvtmb.c +++ b/sal/textenc/tcvtmb.c @@ -115,7 +115,6 @@ sal_Size ImplDBCSToUnicode( const ImplTextConverterData* pData, void* pContext, if ( (cLead >= pEUDCTab->mnLeadStart) && (cLead <= pEUDCTab->mnLeadEnd) ) { - sal_uInt16 nTrailCount = 0; if ( (cTrail >= pEUDCTab->mnTrail1Start) && (cTrail <= pEUDCTab->mnTrail1End) ) { @@ -126,7 +125,7 @@ sal_Size ImplDBCSToUnicode( const ImplTextConverterData* pData, void* pContext, } else { - nTrailCount = pEUDCTab->mnTrail1End-pEUDCTab->mnTrail1Start+1; + sal_uInt16 nTrailCount = pEUDCTab->mnTrail1End-pEUDCTab->mnTrail1Start+1; if ( (pEUDCTab->mnTrailCount >= 2) && (cTrail >= pEUDCTab->mnTrail2Start) && (cTrail <= pEUDCTab->mnTrail2End) ) |