diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-01-26 15:10:03 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-01-26 17:34:15 +0100 |
commit | 0288c8ffecff4956a52b9147d441979941e8b87f (patch) | |
tree | f1b8758bec896b4abb7e458a4eb395fce6f43c9b /binaryurp | |
parent | 2f019777fbbd2a1f9821f5d19608cc2a36413d9d (diff) |
Rephrase cast from sal_Int32 to sal_uInt32
...to avoid false positives with upcoming loplugin:unsignedcompare:
> vbahelper/source/msforms/vbacontrol.cxx:730:12: error: explicit cast from 'sal_Int32' (aka 'int') to 'sal_uInt32' (aka 'unsigned int') (of equal rank) in comparison against 'sal_uInt32': if the cast value is known to be non-negative, use o3tl::make_unsigned instead of the cast [loplugin:unsignedcompare]
> if ( ( static_cast<sal_uInt32>(nBackColor) >= sal_uInt32(0x80000000) ) &&
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> vbahelper/source/msforms/vbacontrol.cxx:731:12: error: explicit cast from 'sal_Int32' (aka 'int') to 'sal_uInt32' (aka 'unsigned int') (of equal rank) in comparison against 'unsigned long': if the cast value is known to be non-negative, use o3tl::make_unsigned instead of the cast [loplugin:unsignedcompare]
> ( static_cast<sal_uInt32>(nBackColor) <= sal_uInt32(0x80000000) + SAL_N_ELEMENTS(nSysCols) ) )
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(This is the only case I found where the plugin's heuristics failed.)
Change-Id: I36d12caa0f837b8ba860eaf33b3e166a4f1001fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87454
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'binaryurp')
0 files changed, 0 insertions, 0 deletions