3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

fix compiler warnings

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-07-04 13:17:37 -07:00
parent 253870c6d7
commit a1306eaab6
8 changed files with 14 additions and 10 deletions

View file

@ -158,8 +158,7 @@ static void FUN_NAME(int a, ext_numeral_kind ak, int b, ext_numeral_kind bk, boo
scoped_mpq _a(m), _b(m); \
m.set(_a, a); \
m.set(_b, b); \
bool r = OP_NAME(m, _a, ak, _b, bk); \
SASSERT(r == expected); \
VERIFY(expected == OP_NAME(m, _a, ak, _b, bk)); \
}
#define MK_TST_REL(NAME) MK_TST_REL_CORE(tst_ ## NAME, NAME)

View file

@ -47,12 +47,13 @@ static void tst1() {
for (; it != end; ++it) {
SASSERT(h.contains(*it));
}
int last = -1;
while (!h.empty()) {
int m1 = h.min_value();
int m2 = h.erase_min();
(void)m1;
(void)m2;
SASSERT(m1 == m2);
SASSERT(last < m2);
SASSERT(-1 < m2);
}
}

View file

@ -58,7 +58,7 @@ namespace karr {
}
lbool is_sat = hb.saturate();
hb.display(std::cout);
SASSERT(is_sat == l_true);
VERIFY(is_sat == l_true);
dst.reset();
unsigned basis_size = hb.get_basis_size();
for (unsigned i = 0; i < basis_size; ++i) {
@ -85,7 +85,7 @@ namespace karr {
}
lbool is_sat = hb.saturate();
hb.display(std::cout);
SASSERT(is_sat == l_true);
VERIFY(is_sat == l_true);
dst.reset();
unsigned basis_size = hb.get_basis_size();
bool first_initial = true;

View file

@ -20,6 +20,7 @@ static void add_ineq(opt::model_based_opt& mbo,
mbo.add_constraint(vars, rational(k), rel);
}
#if 0
static void add_ineq(opt::model_based_opt& mbo,
unsigned x, int a,
unsigned y, int b,
@ -31,6 +32,7 @@ static void add_ineq(opt::model_based_opt& mbo,
vars.push_back(var(z, rational(c)));
mbo.add_constraint(vars, rational(k), rel);
}
#endif
static void add_random_ineq(opt::model_based_opt& mbo,
random_gen& r,
@ -295,7 +297,7 @@ static void test8() {
unsigned z = mbo.add_var(rational(4));
unsigned u = mbo.add_var(rational(5));
unsigned v = mbo.add_var(rational(6));
unsigned w = mbo.add_var(rational(6));
// unsigned w = mbo.add_var(rational(6));
add_ineq(mbo, x0, 1, y, -1, 0, opt::t_le);
add_ineq(mbo, x, 1, y, -1, 0, opt::t_lt);

View file

@ -28,7 +28,6 @@ void tst_model_evaluator() {
expr_ref vB2(m.mk_var(2, m.mk_bool_sort()), m);
expr* vI0p = vI0.get();
expr* vI1p = vI1.get();
expr* vB0p = vB0.get();
expr* vB1p = vB1.get();
expr* vB2p = vB2.get();

View file

@ -147,6 +147,7 @@ void tst_div2k(synch_mpz_manager & m, mpz const & v, unsigned k) {
m.power(two, k, pw);
m.machine_div(v, pw, y);
bool is_eq = m.eq(x, y);
(void)is_eq;
CTRACE("mpz_2k", !is_eq, tout << "div: " << m.to_string(v) << ", k: " << k << " r: " << m.to_string(x) << ", expected: " << m.to_string(y) << "\n";);
SASSERT(is_eq);
m.del(x);
@ -174,6 +175,7 @@ void tst_mul2k(synch_mpz_manager & m, mpz const & v, unsigned k) {
m.power(two, k, pw);
m.mul(v, pw, y);
bool is_eq = m.eq(x, y);
(void)is_eq;
CTRACE("mpz_2k", !is_eq, tout << "mul: " << m.to_string(v) << ", k: " << k << " r: " << m.to_string(x) << ", expected: " << m.to_string(y) << "\n";);
SASSERT(is_eq);
m.del(x);

View file

@ -61,6 +61,7 @@ static void tst1() {
m.recycle(c1);
cell * c3 = m.allocate<true>();
(void)c3;
SASSERT(c3->m_coeff.is_zero());
}

View file

@ -163,7 +163,7 @@ static app_ref generate_ineqs(ast_manager& m, sort* s, vector<expr_ref_vector>&
app* x = vars[0].get();
app* y = vars[1].get();
app* z = vars[2].get();
// app* z = vars[2].get();
//
// ax <= by, ax < by, not (ax >= by), not (ax > by)
//
@ -247,7 +247,7 @@ static void test2(char const *ex) {
ctx.push();
ctx.assert_expr(fml);
lbool result = ctx.check();
SASSERT(result == l_true);
VERIFY(result == l_true);
ref<model> md;
ctx.get_model(md);
ctx.pop(1);