Changeset 451


Ignore:
Timestamp:
Nov 3, 2011 12:17:56 AM (8 years ago)
Author:
bjarni
Message:

Casting userParam argument to remove compiler warnings for unitTest.cpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CoinMP/test/unitTest.cpp

    r448 r451  
    123123        int result;
    124124        char filename[260];
    125         char *userParam = "TEST";
     125        const char *userParam = "TEST";
    126126   
    127127        fprintf(stdout, "Solve Problem: %s (obj=%.20g)\n", problemName, optimalValue);
     
    139139                fprintf(stdout, "Check Problem failed (result = %d)\n", result);
    140140        }
    141         result = CoinRegisterMsgLogCallback(hProb, &MsgLogCallback, userParam);
     141        result = CoinRegisterMsgLogCallback(hProb, &MsgLogCallback, (void*)userParam);
    142142        if (columnType == NULL)
    143                 result = CoinRegisterLPIterCallback(hProb, &IterCallback, userParam);
     143                result = CoinRegisterLPIterCallback(hProb, &IterCallback, (void*)userParam);
    144144        else {
    145                 result = CoinRegisterMipNodeCallback(hProb, &MipNodeCallback, userParam);
     145                result = CoinRegisterMipNodeCallback(hProb, &MipNodeCallback, (void*)userParam);
    146146        }
    147147        result = CoinOptimizeProblem(hProb, 0);
     
    163163        int result;
    164164        char filename[260];
    165         char *userParam = "TEST";
     165        const char *userParam = "TEST";
    166166   
    167167        fprintf(stdout, "Solve Problem: %s (obj=%.20g)\n", problemName, optimalValue);
     
    179179                fprintf(stdout, "Check Problem failed (result = %d)\n", result);
    180180        }
    181         result = CoinRegisterMsgLogCallback(hProb, &MsgLogCallback, userParam);
     181        result = CoinRegisterMsgLogCallback(hProb, &MsgLogCallback, (void*)userParam);
    182182        if (columnType == NULL)
    183                 result = CoinRegisterLPIterCallback(hProb, &IterCallback, userParam);
     183                result = CoinRegisterLPIterCallback(hProb, &IterCallback, (void*)userParam);
    184184        else {
    185                 result = CoinRegisterMipNodeCallback(hProb, &MipNodeCallback, userParam);
     185                result = CoinRegisterMipNodeCallback(hProb, &MipNodeCallback, (void*)userParam);
    186186        }
    187187        result = CoinOptimizeProblem(hProb, 0);
     
    205205        int result;
    206206        char filename[260];
    207         char *userParam = "TEST";
     207        const char *userParam = "TEST";
    208208 
    209209        fprintf(stdout, "Solve Problem: %s (obj=%.20g)\n", problemName, optimalValue);
     
    230230                fprintf(stdout, "Check Problem failed (result = %d)\n", result);
    231231        }
    232         result = CoinRegisterMsgLogCallback(hProb, &MsgLogCallback, userParam);
     232        result = CoinRegisterMsgLogCallback(hProb, &MsgLogCallback, (void*)userParam);
    233233        if ((columnType == NULL) && (sosCount == 0) && (semiCount == 0))
    234                 result = CoinRegisterLPIterCallback(hProb, &IterCallback, userParam);
     234                result = CoinRegisterLPIterCallback(hProb, &IterCallback, (void*)userParam);
    235235        else {
    236                 result = CoinRegisterMipNodeCallback(hProb, &MipNodeCallback, userParam);
     236                result = CoinRegisterMipNodeCallback(hProb, &MipNodeCallback, (void*)userParam);
    237237        }
    238238        strcpy(filename, problemName);
Note: See TracChangeset for help on using the changeset viewer.