[Clp-tickets] [COIN-OR Linear Programming Solver] #72: Semicolon at the end of an if-statement looks like a bug.

COIN-OR Linear Programming Solver coin-trac at coin-or.org
Sun Jul 26 08:56:11 EDT 2015


#72: Semicolon at the end of an if-statement looks like a bug.
------------------------+----------------------
 Reporter:  petter      |      Owner:  somebody
     Type:  defect      |     Status:  new
 Priority:  major       |  Milestone:
Component:  component1  |    Version:
 Keywords:              |
------------------------+----------------------
 The following code is from ClpSolver.cpp (starting at line 7262 in my
 revision).


 {{{
                   for (int i = 0; i < numberRows2; i++) {
                     if (sub[iBlock].getRowStatus(i)==basic &&
 fabs(solution[i])<1.0e-7)
                       solution[i]=0.0;
                     if (solution[i] > dualTolerance_) {
                       // at upper
                       if (saveUpper[i] > 1.0e20)
                         solution[i]=0.0;
                       objValue += solution[i] * saveUpper[i];
                     } else if (solution[i] < -dualTolerance_) {
                       // at lower
                       if (saveLower[i] < -1.0e20);
                         solution[i]=0.0;
                       objValue += solution[i] * saveLower[i];
                     } else {
                       solution[i]=0.0;
                     }
                   }
 }}}


 The semicolon at the end of the if-statement looks like a bug to me.

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



More information about the Clp-tickets mailing list