summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-07-03 14:04:18 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-07-03 14:04:18 +0200
commit1e5e504b2f88fb29a823663fae505863ac00f593 (patch)
tree748f79406456fd005a96c7f291cbc6b33938579d /tools
parent6507c0271f081d93ddf68dac25abfe4bd46f0554 (diff)
loplugin:oncevar (clang-cl): tools
Change-Id: I6670c2fd0c5897939b16874ed2106475fa948d2d
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