summaryrefslogtreecommitdiff
path: root/sal/rtl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-01-21 11:34:17 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-01-21 14:22:31 +0000
commit679ca2901460d55bbfe31515c60c6f996614f245 (patch)
treea3219bca1d1226e4e7b123a114cee52ee1186bf7 /sal/rtl
parent113a18833a0fd6456334ba43ecaa54cb8dc3b81f (diff)
cppcheck: misc scope and unused variables
Diffstat (limited to 'sal/rtl')
-rw-r--r--sal/rtl/source/hash.cxx3
-rw-r--r--sal/rtl/source/math.cxx2
2 files changed, 2 insertions, 3 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;