Changeset 775


Ignore:
Timestamp:
Sep 1, 2007 11:47:00 PM (12 years ago)
Author:
ladanyi
Message:

got rid of compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/Cbc_ampl.cpp

    r774 r775  
    115115static char xxxxxx[20];
    116116#define VP (char*)
    117  static keyword keywds[] = { /* must be sorted */
    118         { "barrier",    checkPhrase,            (char *) xxxxxx ,"-barrier" },
    119         { "dual",       checkPhrase,            (char *) xxxxxx , "-dualsimplex"},
    120         { "help",       checkPhrase2,           (char *) xxxxxx , "-?"},
    121         { "initial",    checkPhrase,            (char *) xxxxxx , "-initialsolve"},
    122         { "max",        checkPhrase2,           (char *) xxxxxx , "-maximize"},
    123         { "maximize",   checkPhrase2,           (char *) xxxxxx , "-maximize"},
    124         { "primal",     checkPhrase,            (char *) xxxxxx , "-primalsimplex"},
    125         { "quit",       checkPhrase2,           (char *) xxxxxx , "-quit"},
    126         { "wantsol",    WS_val,         NULL, "write .sol file (without -AMPL)" }
    127         };
    128 static Option_Info Oinfo = {"cbc", "Cbc 1.04", "cbc_options", keywds, nkeywds, 0, "",
    129                                 0,decodePhrase,0,0,0, 20070606 };
     117static keyword keywds[] = { /* must be sorted */
     118  { const_cast<char*>("barrier"),  checkPhrase,  (char *) xxxxxx ,
     119    const_cast<char*>("-barrier")},
     120  { const_cast<char*>("dual"),     checkPhrase,  (char *) xxxxxx ,
     121    const_cast<char*>("-dualsimplex")},
     122  { const_cast<char*>("help"),     checkPhrase2, (char *) xxxxxx ,
     123    const_cast<char*>("-?")},
     124  { const_cast<char*>("initial"),  checkPhrase,  (char *) xxxxxx ,
     125    const_cast<char*>("-initialsolve")},
     126  { const_cast<char*>("max"),      checkPhrase2, (char *) xxxxxx ,
     127    const_cast<char*>("-maximize")},
     128  { const_cast<char*>("maximize"), checkPhrase2, (char *) xxxxxx ,
     129    const_cast<char*>("-maximize")},
     130  { const_cast<char*>("primal"),   checkPhrase,  (char *) xxxxxx ,
     131    const_cast<char*>("-primalsimplex")},
     132  { const_cast<char*>("quit"),     checkPhrase2, (char *) xxxxxx ,
     133    const_cast<char*>("-quit")},
     134  { const_cast<char*>("wantsol"),  WS_val,       NULL,
     135    const_cast<char*>("write .sol file (without -AMPL)")}
     136};
     137static Option_Info Oinfo = {
     138  const_cast<char*>("cbc"),
     139  const_cast<char*>("Cbc 1.04"),
     140  const_cast<char*>("cbc_options"),
     141  keywds,
     142  nkeywds,
     143  0,
     144  const_cast<char*>(""),
     145  0,
     146  decodePhrase,
     147  0,
     148  0,
     149  0,
     150  20070606 };
    130151// strdup used to avoid g++ compiler warning
    131  static SufDecl
    132 suftab[] = {
     152static SufDecl suftab[] = {
    133153#if 0
    134         { "current", 0, ASL_Sufkind_con | ASL_Sufkind_outonly },
    135         { "current", 0, ASL_Sufkind_var | ASL_Sufkind_outonly },
    136         { "direction", 0, ASL_Sufkind_var },
    137         { "down", 0, ASL_Sufkind_con | ASL_Sufkind_outonly },
    138         { "down", 0, ASL_Sufkind_var | ASL_Sufkind_outonly },
    139         { "priority", 0, ASL_Sufkind_var },
     154  { const_cast<char*>("current"), 0, ASL_Sufkind_con | ASL_Sufkind_outonly },
     155  { const_cast<char*>("current"), 0, ASL_Sufkind_var | ASL_Sufkind_outonly },
     156  { const_cast<char*>("direction"), 0, ASL_Sufkind_var },
     157  { const_cast<char*>("down"), 0, ASL_Sufkind_con | ASL_Sufkind_outonly },
     158  { const_cast<char*>("down"), 0, ASL_Sufkind_var | ASL_Sufkind_outonly },
     159  { const_cast<char*>("priority"), 0, ASL_Sufkind_var },
    140160#endif
    141         { "cut", 0, ASL_Sufkind_con },
    142         { "direction", 0, ASL_Sufkind_var },
    143         { "downPseudocost", 0, ASL_Sufkind_var | ASL_Sufkind_real },
    144         { "priority", 0, ASL_Sufkind_var },
    145         { "ref", 0, ASL_Sufkind_var | ASL_Sufkind_real },
    146         { "sos", 0, ASL_Sufkind_var },
    147         { "sos", 0, ASL_Sufkind_con },
    148         { "sosno", 0, ASL_Sufkind_var | ASL_Sufkind_real },
    149         { "sosref", 0, ASL_Sufkind_var | ASL_Sufkind_real },
    150         { "special", 0, ASL_Sufkind_var },
    151         { "special", 0, ASL_Sufkind_con },
    152         /*{ "special", 0, ASL_Sufkind_con },*/
    153         { "sstatus", 0, ASL_Sufkind_var, 0 },
    154         { "sstatus", 0, ASL_Sufkind_con, 0 },
    155         { "upPseudocost", 0, ASL_Sufkind_var | ASL_Sufkind_real }
     161  { const_cast<char*>("cut"), 0, ASL_Sufkind_con },
     162  { const_cast<char*>("direction"), 0, ASL_Sufkind_var },
     163  { const_cast<char*>("downPseudocost"), 0, ASL_Sufkind_var | ASL_Sufkind_real },
     164  { const_cast<char*>("priority"), 0, ASL_Sufkind_var },
     165  { const_cast<char*>("ref"), 0, ASL_Sufkind_var | ASL_Sufkind_real },
     166  { const_cast<char*>("sos"), 0, ASL_Sufkind_var },
     167  { const_cast<char*>("sos"), 0, ASL_Sufkind_con },
     168  { const_cast<char*>("sosno"), 0, ASL_Sufkind_var | ASL_Sufkind_real },
     169  { const_cast<char*>("sosref"), 0, ASL_Sufkind_var | ASL_Sufkind_real },
     170  { const_cast<char*>("special"), 0, ASL_Sufkind_var },
     171  { const_cast<char*>("special"), 0, ASL_Sufkind_con },
     172  /*{ const_cast<char*>("special"), 0, ASL_Sufkind_con },*/
     173  { const_cast<char*>("sstatus"), 0, ASL_Sufkind_var, 0 },
     174  { const_cast<char*>("sstatus"), 0, ASL_Sufkind_con, 0 },
     175  { const_cast<char*>("upPseudocost"), 0, ASL_Sufkind_var | ASL_Sufkind_real }
    156176#if 0
    157         { "unbdd", 0, ASL_Sufkind_var | ASL_Sufkind_outonly},
    158         { "up", 0, ASL_Sufkind_con | ASL_Sufkind_outonly },
    159         { "up", 0, ASL_Sufkind_var | ASL_Sufkind_outonly }
     177  { const_cast<char*>("unbdd"), 0, ASL_Sufkind_var | ASL_Sufkind_outonly},
     178  { const_cast<char*>("up"), 0, ASL_Sufkind_con | ASL_Sufkind_outonly },
     179  { const_cast<char*>("up"), 0, ASL_Sufkind_var | ASL_Sufkind_outonly }
    160180#endif
    161         };
     181};
    162182#include "float.h"
    163183#include "limits.h"
Note: See TracChangeset for help on using the changeset viewer.