From dd0283167767957b1937f2996db627dd613db872 Mon Sep 17 00:00:00 2001 From: zaikunzhang Date: Tue, 30 Apr 2024 21:29:05 +0800 Subject: [PATCH] 240430.212905.HKT fix warning C4133: 'function': incompatible types - from 'prima_rc_t *' to 'int *const ' --- c/prima.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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;