summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/fract.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx
index afcb2e60ba42..7f35dd00907b 100644
--- a/tools/source/generic/fract.cxx
+++ b/tools/source/generic/fract.cxx
@@ -483,10 +483,11 @@ static int impl_NumberOfBits( unsigned long nNum )
nNum |= ( nNum >> 16 );
sal_uInt32 nNumber;
- int nBonus = 0;
+ int nBonus;
#if SAL_TYPES_SIZEOFLONG == 4
nNumber = nNum;
+ nBonus = 0;
#elif SAL_TYPES_SIZEOFLONG == 8
nNum |= ( nNum >> 32 );
@@ -499,7 +500,10 @@ static int impl_NumberOfBits( unsigned long nNum )
return 32;
}
else
+ {
nNumber = sal_uInt32( nNum & 0xFFFFFFFF );
+ nBonus = 0;
+ }
#else
#error "Unknown size of long!"
#endif