summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dave@treblig.org>2021-01-30 17:30:39 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2021-02-01 12:25:35 +0100
commitc3a8fe7b40465134e500d5698b1455d2181aed4f (patch)
tree40962e4a6a2e7795ec8937b2750dc336e15c33b6 /sc/source/core
parente267fe1a3dffc39bf5076dd6413ed3b0e698378c (diff)
cppcheck: Clean up signed 32 bit shift by 31
cppcheck moans about 1<<n where n can be 31; ubsan also complains; they're probably right even if it's unlikely to ever be a problem. Use 1U << 31 Change-Id: Ic83d7d240db4595c2562c1f91116491044d70bab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110173 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/tool/appoptio.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index fda7236be3c6..1bc0b2540e6b 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -252,7 +252,7 @@ static sal_uInt32 lcl_ConvertStatusBarFuncSetToSingle( sal_uInt32 nFuncSet )
if ( !nFuncSet )
return 0;
for ( sal_uInt32 nFunc = 1; nFunc < 32; ++nFunc )
- if ( nFuncSet & ( 1 << nFunc ) )
+ if ( nFuncSet & ( 1U << nFunc ) )
return nFunc;
return 0;
}