[Ipopt-tickets] [Ipopt] #219: IpAdaptiveMuUpdate.cpp:700: missing break

Ipopt coin-trac at coin-or.org
Thu Sep 5 03:58:09 EDT 2013


#219: IpAdaptiveMuUpdate.cpp:700: missing break
-------------------+------------------------
Reporter:  dcb314  |      Owner:  ipopt-team
    Type:  defect  |     Status:  new
Priority:  normal  |  Component:  Ipopt
 Version:  3.11    |   Severity:  normal
Keywords:          |
-------------------+------------------------
 I just ran the static analyser "cppcheck" over the source
 code of coin-or-iopt-3.11.0

 It said

 [IpAdaptiveMuUpdate.cpp:700] -> [IpAdaptiveMuUpdate.cpp:702]: (warning)
 Variable 'centrality' is reassigned a value before the old one has been
 used. 'break;' missing?

 Source code is

       case 2:
         centrality = complty/xi;
       case 3:
         centrality = complty/pow(xi,3);
         break;

 Suggest add break statement.

--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/219>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.



More information about the Ipopt-tickets mailing list