Cppcheck: incorrectLogicOperator in svxrectctaccessiblecontext.cxx (in svx module)

julien2412 serval2412 at yahoo.fr
Sun May 12 10:25:18 PDT 2013


Hello,

cppcheck reported this:
<error file="svx/source/accessibility/svxrectctaccessiblecontext.cxx"
line="612" id="incorrectLogicOperator" severity="style" msg="Logical
disjunction always evaluates to true: nIndex >= 0 || nIndex < 0."/>

Indeed we have in this file that:
    610 void SvxRectCtlAccessibleContext::checkChildIndex( long nIndex )
throw( lang::IndexOutOfBoundsException )
    611 {
    612     if( nIndex < 0 || nIndex >= getAccessibleChildCount() )
    613         throw lang::IndexOutOfBoundsException();
    614 }

and that!
    883 sal_Int32 SAL_CALL
SvxRectCtlChildAccessibleContext::getAccessibleChildCount( void ) throw(
RuntimeException )
    884 {
    885     return 0;
    886 }

And this last one is like this since 2002!

What should be done here?

Julien



--
View this message in context: http://nabble.documentfoundation.org/Cppcheck-incorrectLogicOperator-in-svxrectctaccessiblecontext-cxx-in-svx-module-tp4055534.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list