Hello, Cppcheck reports this in sdext module : [source/minimizer/optimizerdialog.cxx:276]: (warning) Logical disjunction always evaluates to true: nNewStep >= 0 || nNewStep <= 4 Here is the line : if ( ( nNewStep != mnCurrentStep ) && ( ( nNewStep <= MAX_STEP ) || ( nNewStep >= 0 ) ) )
Shouldn't it be : if ( ( nNewStep != mnCurrentStep ) && ( nNewStep <= MAX_STEP ) && ( nNewStep >= 0 ) ) ? Moreover, if I'm right, should we additionnally throw an exception (which one ?) if "nNewStep" is not between 0 and MAX_STEP If ok for just the condition change, I can commit and push on master (what about 3.5 ?) About the exception, I don't know what to put. Julien. -- View this message in context: http://nabble.documentfoundation.org/Cppcheck-reports-Logical-disjunction-always-evaluates-to-true-in-sdext-module-tp3836919p3836919.html Sent from the Dev mailing list archive at Nabble.com. _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice