Skip to content

Commit

Permalink
240430.212905.HKT fix warning C4133: 'function': incompatible types -…
Browse files Browse the repository at this point in the history
… from 'prima_rc_t *' to 'int *const '
  • Loading branch information
zaikunzhang committed Apr 30, 2024
1 parent 03213fe commit dd02831
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions c/prima.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ const char *prima_get_rc_string(const prima_rc_t rc)
// The function that does the minimization using a PRIMA solver
prima_rc_t prima_minimize(const prima_algorithm_t algorithm, const prima_problem_t problem, const prima_options_t options, prima_result_t *const result)
{
int info = prima_init_result(result, problem);
int info = (int) prima_init_result(result, problem);

if (info == PRIMA_RC_DFT)
info = prima_check_problem(problem, algorithm);
info = (int) prima_check_problem(problem, algorithm);

if (info == PRIMA_RC_DFT) {
// We copy x0 into result->x only after prima_check_problem has succeeded,
Expand Down Expand Up @@ -232,11 +232,11 @@ prima_rc_t prima_minimize(const prima_algorithm_t algorithm, const prima_problem
break;

default:
info = PRIMA_INVALID_INPUT;
info = (int) PRIMA_INVALID_INPUT;
}
}

result->status = info;
result->status = (prima_rc_t) info;
result->message = prima_get_rc_string(result->status);

return result->status;
Expand Down

0 comments on commit dd02831

Please sign in to comment.