diff --git a/backends/aiger2/aiger.cc b/backends/aiger2/aiger.cc index a230cda4f..141217fe5 100644 --- a/backends/aiger2/aiger.cc +++ b/backends/aiger2/aiger.cc @@ -262,7 +262,8 @@ struct Index { if (cell->type.in(ID($gt), ID($ge))) std::swap(aport, bport); int carry = cell->type.in(ID($le), ID($ge)) ? CFALSE : CTRUE; - Lit a, b; + Lit a = Writer::EMPTY_LIT; + Lit b = Writer::EMPTY_LIT; // TODO: this might not be the most economic structure; revisit at a later date for (int i = 0; i < width; i++) { a = visit(cursor, aport[i]); @@ -664,8 +665,6 @@ struct Index { struct AigerWriter : Index { typedef unsigned int Lit; - const static Lit CONST_FALSE = 0; - const static Lit CONST_TRUE = 1; const static constexpr Lit EMPTY_LIT = std::numeric_limits::max(); static Lit negate(Lit lit) { @@ -802,8 +801,6 @@ struct AigerWriter : Index { }; struct XAigerAnalysis : Index { - const static int CONST_FALSE = 0; - const static int CONST_TRUE = 0; const static constexpr int EMPTY_LIT = -1; XAigerAnalysis() diff --git a/frontends/aiger2/xaiger.cc b/frontends/aiger2/xaiger.cc index 04beee396..dd3ca4285 100644 --- a/frontends/aiger2/xaiger.cc +++ b/frontends/aiger2/xaiger.cc @@ -198,11 +198,10 @@ struct Xaiger2Frontend : public Frontend { int ci_counter = 0; for (uint32_t i = 0; i < no_boxes; i++) { - uint32_t box_inputs, box_outputs, box_id, box_seq; - box_inputs = read_be32(*f); - box_outputs = read_be32(*f); - box_id = read_be32(*f); - box_seq = read_be32(*f); + /* unused box_inputs = */ read_be32(*f); + YS_MAYBE_UNUSED auto box_outputs = read_be32(*f); + /* unused box_id = */ read_be32(*f); + auto box_seq = read_be32(*f); log("box_seq=%d boxes.size=%d\n", box_seq, (int) boxes.size()); log_assert(box_seq < boxes.size()); @@ -337,11 +336,10 @@ struct Xaiger2Frontend : public Frontend { len, ci_num, co_num, pi_num, po_num, no_boxes); for (uint32_t i = 0; i < no_boxes; i++) { - uint32_t box_inputs, box_outputs, box_id, box_seq; - box_inputs = read_be32(*f); - box_outputs = read_be32(*f); - box_id = read_be32(*f); - box_seq = read_be32(*f); + YS_MAYBE_UNUSED auto box_inputs = read_be32(*f); + /* unused box_outputs = */ read_be32(*f); + /* unused box_id = */ read_be32(*f); + auto box_seq = read_be32(*f); log("box_seq=%d boxes.size=%d\n", box_seq, (int) boxes.size()); log_assert(box_seq < boxes.size());