summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-18 20:23:09 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-11-19 00:39:18 +0100
commit55df51923cfee438092e6f259574710418d62224 (patch)
treeb5538651a08e25274c5687d57af4d043762a3fd9
parent9ccdf4d8abf6ec6612c88ab65be25eb6be89b455 (diff)
coverity#1441442 Unintended sign extension
Change-Id: Id0286f34ccc387dd148e42b83e8f62aacfb54219 Reviewed-on: https://gerrit.libreoffice.org/63535 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/filter/inc/ftools.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 1fcfe6339f2f..81b0b44e688c 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -99,7 +99,7 @@ inline void set_flag( Type& rnBitField, Type nMask, bool bSet = true )
template< typename Type, typename InsertType >
void insert_value( Type& rnBitField, InsertType nValue, sal_uInt8 nStartBit, sal_uInt8 nBitCount )
{
- unsigned long nMask = ((1UL << nBitCount) - 1);
+ unsigned int nMask = ((1U << nBitCount) - 1);
Type nNewValue = static_cast< Type >( nValue & nMask );
rnBitField = (rnBitField & ~(nMask << nStartBit)) | (nNewValue << nStartBit);
}