From 032f11b0f8218463ec4e81a02e12474f8c36702f Mon Sep 17 00:00:00 2001 From: Cody Martin Date: Wed, 19 Apr 2023 23:00:17 -0700 Subject: [PATCH] Allow compilation with PRINTLEVEL >= 3 Fix print statement to use var_idx instead of undeclared variable i. This is required to allow th code to compile with PRINTLEVEL >= 3. --- ecos_bb/ecos_bb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecos_bb/ecos_bb.c b/ecos_bb/ecos_bb.c index 1a76213..5f2ae20 100644 --- a/ecos_bb/ecos_bb.c +++ b/ecos_bb/ecos_bb.c @@ -414,7 +414,7 @@ static int check_infeasible_bool_var(ecos_bb_pwork *problem, const idxint ecos_r get_bool_node_id(node_idx, problem)[var_idx] = other_val; problem->tmp_branching_bool_node_id[var_idx] = other_val; #if PRINTLEVEL >= 3 - PRINTTEXT("Found infeasible node path for down-branching in node [%d] in var [%d]\n", node_idx, i); + PRINTTEXT("Found infeasible node path for down-branching in node [%d] in var [%d]\n", node_idx, var_idx); #endif // prevent to have no branching variable set because of continuing if (*split_idx == -1) @@ -443,7 +443,7 @@ static int check_infeasible_int_var(ecos_bb_pwork *problem, const idxint ecos_re get_int_node_id(node_idx, problem)[2 * var_idx + (fix_lb ? 0 : 1)] = fix_val; problem->tmp_branching_int_node_id[2 * var_idx + (fix_lb ? 0 : 1)] = fix_val; #if PRINTLEVEL >= 3 - PRINTTEXT("Found infeasible node path for down-branching in node [%d] in var [%d]\n", node_idx, i); + PRINTTEXT("Found infeasible node path for down-branching in node [%d] in var [%d]\n", node_idx, var_idx); #endif // prevent to have no branching variable set because of continuing if (*split_idx == -1)