3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-26 04:56:03 +00:00

Add and fix a few general compiler warnings. (#5628)

* rewriter: fix unused variable warnings

* cmake: make missing non-virtual dtors error

* treewide: add missing virtual destructors

* cmake: add a few more checks

* api: add missing virtual destructor to user_propagator_base

* examples: compile cpp example with compiler warnings

* model: fix unused variable warnings

* rewriter: fix logical-op-parentheses warnings

* sat: fix unused variable warnings

* smt: fix unused variable warnings
This commit is contained in:
Henrich Lauko 2021-10-29 15:42:32 +02:00 committed by GitHub
parent 1d45a33163
commit 96671cfc73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 68 additions and 9 deletions

View file

@ -40,6 +40,7 @@ namespace sat {
class literal_occs_fun {
public:
virtual double operator()(literal l) = 0;
virtual ~literal_occs_fun() = default;
};

View file

@ -1893,7 +1893,6 @@ namespace sat {
void solver::init_ext_assumptions() {
if (m_ext && m_ext->tracking_assumptions()) {
m_ext_assumption_set.reset();
unsigned trail_size = m_trail.size();
if (!inconsistent())
m_ext->add_assumptions(m_ext_assumption_set);
}

View file

@ -119,7 +119,7 @@ namespace array {
bool solver::must_have_different_model_values(theory_var v1, theory_var v2) {
euf::enode* else1 = nullptr, * else2 = nullptr;
euf::enode* n1 = var2enode(v1), *n2 = var2enode(v2);
euf::enode* n1 = var2enode(v1);
expr* e1 = n1->get_expr();
if (!a.is_array(e1))
return true;

View file

@ -52,6 +52,9 @@ namespace pb {
constraint(tag_t t, unsigned id, literal l, unsigned sz, size_t osz, unsigned k):
m_tag(t), m_lit(l), m_size(sz), m_obj_size(osz), m_id(id), m_k(k) {
}
virtual ~constraint() = default;
sat::ext_constraint_idx cindex() const { return sat::constraint_base::mem2base(this); }
void deallocate(small_object_allocator& a) { a.deallocate(obj_size(), sat::constraint_base::mem2base_ptr(this)); }
unsigned id() const { return m_id; }

View file

@ -35,6 +35,7 @@ namespace pb {
class solver_interface {
public:
virtual ~solver_interface() = default;
virtual lbool value(bool_var v) const = 0;
virtual lbool value(literal lit) const = 0;
virtual bool is_false(literal lit) const = 0;