diff --git a/c/prima.c b/c/prima.c index a28bb78e85..edc68488e6 100644 --- a/c/prima.c +++ b/c/prima.c @@ -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, @@ -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;