Skip to content

Commit 49ba3bc

Browse files
address compiler warnings gcc-13
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
1 parent cff1e92 commit 49ba3bc

File tree

9 files changed

+4147
-4151
lines changed

9 files changed

+4147
-4151
lines changed

src/ast/proofs/proof_utils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class elim_aux_assertions {
230230
<< "New pf: " << mk_pp(newp, m) << "\n";);
231231
}
232232

233-
proof *r;
233+
proof *r = nullptr;
234234
VERIFY(cache.find(pr, r));
235235

236236
DEBUG_CODE(

src/ast/simplifiers/dominator_simplifier.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ expr_ref dominator_simplifier::simplify_and_or(bool is_and, app * e) {
187187
}
188188

189189
expr_ref dominator_simplifier::simplify_not(app * e) {
190-
expr *ee;
191-
ENSURE(m.is_not(e, ee));
190+
expr *ee = nullptr;
191+
VERIFY(m.is_not(e, ee));
192192
unsigned old_lvl = scope_level();
193193
expr_ref t = simplify_rec(ee);
194194
local_pop(scope_level() - old_lvl);

src/ast/sls/bv_sls_eval.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ namespace bv {
145145
SASSERT(m.is_bool(e));
146146
SASSERT(e->get_family_id() == basic_family_id);
147147

148-
auto id = e->get_id();
149148
switch (e->get_decl_kind()) {
150149
case OP_TRUE:
151150
return true;

src/muz/spacer/spacer_concretize.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct proc {
2727
void operator()(var *n) const {}
2828
void operator()(quantifier *q) const {}
2929
void operator()(app const *n) const {
30-
expr *e1, *e2;
30+
expr *e1 = nullptr, *e2 = nullptr;
3131
if (m_arith.is_mul(n, e1, e2)) {
3232
if (is_var(e1) && !is_var(e2))
3333
m_marks.mark(e2);
@@ -71,7 +71,7 @@ bool pob_concretizer::apply(const expr_ref_vector &cube, expr_ref_vector &out) {
7171
}
7272

7373
bool pob_concretizer::is_split_var(expr *e, expr *&var, bool &pos) {
74-
expr *e1, *e2;
74+
expr *e1 = nullptr, *e2 = nullptr;
7575
rational n;
7676

7777
if (m_var_marks.is_marked(e)) {
@@ -89,7 +89,7 @@ bool pob_concretizer::is_split_var(expr *e, expr *&var, bool &pos) {
8989
}
9090

9191
void pob_concretizer::split_lit_le_lt(expr *_lit, expr_ref_vector &out) {
92-
expr *e1, *e2;
92+
expr *e1 = nullptr, *e2 = nullptr;
9393

9494
expr *lit = _lit;
9595
m.is_not(_lit, lit);
@@ -133,7 +133,7 @@ void pob_concretizer::split_lit_le_lt(expr *_lit, expr_ref_vector &out) {
133133
}
134134

135135
void pob_concretizer::split_lit_ge_gt(expr *_lit, expr_ref_vector &out) {
136-
expr *e1, *e2;
136+
expr *e1 = nullptr, *e2 = nullptr;
137137

138138
expr *lit = _lit;
139139
m.is_not(_lit, lit);
@@ -182,7 +182,7 @@ bool pob_concretizer::apply_lit(expr *_lit, expr_ref_vector &out) {
182182

183183
// split literals of the form a1*x1 + ... + an*xn ~ c, where c is a
184184
// constant, ~ is <, <=, >, or >=, and the top level operator of LHS is +
185-
expr *e1, *e2;
185+
expr *e1 = nullptr, *e2 = nullptr;
186186
if ((m_arith.is_lt(lit, e1, e2) || m_arith.is_le(lit, e1, e2)) &&
187187
m_arith.is_add(e1)) {
188188
SASSERT(m_arith.is_numeral(e2));

src/nlsat/nlsat_explain.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ namespace nlsat {
126126
scoped_literal_vector m_core2;
127127

128128
// temporary fields for storing the result
129-
scoped_literal_vector * m_result;
129+
scoped_literal_vector * m_result = nullptr;
130130
svector<char> m_already_added_literal;
131131

132132
evaluator & m_evaluator;
@@ -149,8 +149,6 @@ namespace nlsat {
149149
m_todo(u),
150150
m_core1(s),
151151
m_core2(s),
152-
m_result(nullptr),
153-
154152
m_cell_sample(is_sample),
155153

156154
m_evaluator(ev) {

src/nlsat/nlsat_simplify.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ namespace nlsat {
9393
}
9494

9595
void update_clauses(u_map<literal> const& b2l) {
96-
bool is_sat = true;
9796
literal_vector lits;
9897
unsigned n = m_clauses.size();
9998

0 commit comments

Comments
 (0)