diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-11-18 20:23:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-19 00:39:18 +0100 |
commit | 55df51923cfee438092e6f259574710418d62224 (patch) | |
tree | b5538651a08e25274c5687d57af4d043762a3fd9 /sc | |
parent | 9ccdf4d8abf6ec6612c88ab65be25eb6be89b455 (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>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/inc/ftools.hxx | 2 |
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); } |