Hi David, On 17 Dec 2013, at 20:20 , David Binderman <[email protected]> wrote:
> Hello there, > > I just ran the static analyser "cppcheck" over the source > code of doxygen-1.8.5. It said many things, including > > [doxygen.cpp:3572]: (warning) Logical conjunction always evaluates to false: > EXPR != -1 && EXPR == -1. > > Source code is > > if (md->getStartBodyLine()!=-1 && md->getStartBodyLine()==-1) > > Suggest code rework. Thanks, I've push this change to GitHub to fix it: https://github.com/doxygen/doxygen/commit/585efafb18dbdc371a46063cbeb272e5bb292628 > > The analyser also said > > [fortranscanner.cpp:1307]: (style) Array index 'i' is used before limits > check. > [markdown.cpp:541]: (style) Array index 'i' is used before limits check. > [markdown.cpp:1317]: (style) Array index 'i' is used before limits check. > [markdown.cpp:1323]: (style) Array index 'i' is used before limits check. > > which may also be worth fixing. These appeared to be false positives, all concern an array 'a' with size 's', where the check has the form: if (i<s) { ... if (a[i]==x && i<s-1 && a[i+1]==y) { ... } } cppcheck apparently doesn't see the first guard and is triggered by the second guard, which makes use of the fact that && is evaluated conditionally. Regards, Dimitri ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Doxygen-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/doxygen-develop
