pypredict/lm/lm_python.cpp:1543: bad test ?

Bug #1676077 reported by dcb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Onboard
Fix Committed
Low
Unassigned

Bug Description

Onboard/pypredict/lm/lm_python.cpp:1543]: (warning) Logical conjunction always evaluates to false: recency_ratio < 0.0 && recency_ratio > 1.0.

Maybe better to swap && for ||.

Compiling with gcc compiler flag -Wlogical-op might also help.

Related branches

Revision history for this message
marmuta (marmuta) wrote :

Thank you. Yes, that check always succeeded. It's || now.

-Wlogical-op apparently does not detect this particular problem. I've added it anyway, seems good to have.

Changed in onboard:
status: New → Fix Committed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.