summaryrefslogtreecommitdiff
path: root/test/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-01-26 15:10:03 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-01-26 17:34:15 +0100
commit0288c8ffecff4956a52b9147d441979941e8b87f (patch)
treef1b8758bec896b4abb7e458a4eb395fce6f43c9b /test/source
parent2f019777fbbd2a1f9821f5d19608cc2a36413d9d (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 'test/source')
0 files changed, 0 insertions, 0 deletions