On Oct 8, 2013, at 4:30 AM, David Binderman wrote: > Hello there, > > Offending source code is > > if( ( BattVoltage> 129 ) || ( BattVoltage < 144 ) ) > > Maybe swap || for && would be better.
That does make sense. Silvino, can you confirm that swapping || for && still works on Rhino hardware? (The AutonomyCalc() function has a lot of magic numbers, so I don't want to make assumptions. > This problem I found by using cppcheck. It said > > [rhino.c:190]: (warning) Logical disjunction always evaluates to true: > BattVoltage> 129 || BattVoltage < 144. Interesting that clang did not warn about that - maybe we should add cppcheck to our Buildbot setup, too. -- Charles Lepple clepple@gmail _______________________________________________ Nut-upsdev mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsdev
