[Clp-tickets] [COIN-OR Linear Programming Solver] #76: OsiClpSolverInterface.cpp:7453: bad if test ?

COIN-OR Linear Programming Solver coin-trac at coin-or.org
Sat Nov 19 03:03:51 EST 2016


#76: OsiClpSolverInterface.cpp:7453: bad if test ?
------------------------+----------------------
 Reporter:  dcb314      |      Owner:  somebody
     Type:  defect      |     Status:  new
 Priority:  major       |  Milestone:
Component:  component1  |    Version:
 Keywords:              |
------------------------+----------------------
 OsiClpSolverInterface.cpp:7453:24: warning: logical 'or' of collectively
 exhaustive tests is always true [-Wlogical-op]

 Source code is

   if (array[0]>=0||array[0]<=2)

 Maybe better code

   if (array[0] >= 0 && array[0] <= 2)

--
Ticket URL: <https://projects.coin-or.org/Clp/ticket/76>
COIN-OR Linear Programming Solver <http://projects.coin-or.org/Clp>
A linear programming solver.



More information about the Clp-tickets mailing list