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
commit9018046b03e54d1ff8667cc2ccd91460889ab5f3 (patch)
tree78a2ba55567f509567df653c00d453420d6c4871 /sal/rtl
parent83f04b66fbd58cde2420b2c1846a2b89c5d7cbf1 (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 5ae56a6a0..0f381ea82 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 3c0d5ef48..8f949b3bf 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;