aef7feb3e6
"Find explicit casts from signed to unsigned integer in comparison against
unsigned integer, where the cast is presumably used to avoid warnings about
signed vs. unsigned comparisons, and could thus be replaced with
o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx)
o3tl::make_unsigned requires its argument to be non-negative, and there is a
chance that some original code like
static_cast<sal_uInt32>(n) >= c
used the explicit cast to actually force a (potentially negative) value of
sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the
cast to avoid a false "signed vs. unsigned comparison" warning in a case where
n is known to be non-negative. It appears that restricting this plugin to non-
equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=)
is a useful heuristic to avoid such false positives. The only remainging false
positive I found was
|
||
---|---|---|
.. | ||
dtd | ||
inc | ||
qa | ||
source | ||
uiconfig/startmodule/menubar | ||
util | ||
AllLangMoTarget_fwk.mk | ||
CppunitTest_framework_dispatch.mk | ||
IwyuFilter_framework.yaml | ||
JunitTest_framework_complex.mk | ||
JunitTest_framework_unoapi.mk | ||
Library_fwe.mk | ||
Library_fwi.mk | ||
Library_fwk.mk | ||
Library_fwl.mk | ||
Library_fwm.mk | ||
Makefile | ||
Module_framework.mk | ||
Package_dtd.mk | ||
README | ||
UIConfig_startmodule.mk |
Toolbars, menus, UNO stuff, including accelerators and interaction, etc. See also: http://wiki.openoffice.org/wiki/Framework