From 436a51d8f08b952edce0d38c9bdf6e1d6aa29606 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Sun, 22 Nov 2015 22:10:22 -0800 Subject: [PATCH] fix build of maxsat.c Signed-off-by: Nikolaj Bjorner --- examples/maxsat/maxsat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/maxsat/maxsat.c b/examples/maxsat/maxsat.c index a576d627b..eaf01482c 100644 --- a/examples/maxsat/maxsat.c +++ b/examples/maxsat/maxsat.c @@ -492,6 +492,7 @@ int fu_malik_maxsat_step(Z3_context ctx, Z3_solver s, unsigned num_soft_cnstrs, Z3_ast_vector core; unsigned core_size; unsigned i = 0; + unsigned k = 0; Z3_ast * block_vars; for (i = 0; i < num_soft_cnstrs; i++) { // Recall that we asserted (soft_cnstrs[i] \/ aux_vars[i]) @@ -507,7 +508,7 @@ int fu_malik_maxsat_step(Z3_context ctx, Z3_solver s, unsigned num_soft_cnstrs, core = Z3_solver_get_unsat_core(ctx, s); core_size = Z3_ast_vector_size(ctx, core); block_vars = (Z3_ast*) malloc(sizeof(Z3_ast) * core_size); - unsigned k = 0; + k = 0; // update soft-constraints and aux_vars for (i = 0; i < num_soft_cnstrs; i++) { unsigned j;