3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-27 14:23:35 +00:00

Fix all build warnings with surgical changes

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-05 19:02:39 +00:00 committed by Nikolaj Bjorner
parent b5407d7302
commit 119008b46f
5 changed files with 11 additions and 5 deletions

View file

@ -282,7 +282,6 @@ namespace datalog {
return false; return false;
} }
unsigned udoc_plugin::num_sort_bits(sort* s) const { unsigned udoc_plugin::num_sort_bits(sort* s) const {
unsigned num_bits = 0;
if (bv.is_bv_sort(s)) if (bv.is_bv_sort(s))
return bv.get_bv_size(s); return bv.get_bv_size(s);
if (m.is_bool(s)) if (m.is_bool(s))

View file

@ -356,7 +356,7 @@ namespace smt {
m_context.m_stats.m_num_del_dyn_ack++; m_context.m_stats.m_num_del_dyn_ack++;
app_pair p((app*)nullptr,(app*)nullptr); app_pair p((app*)nullptr,(app*)nullptr);
if (m_clause2app_pair.find(cls, p)) { if (m_clause2app_pair.find(cls, p)) {
auto [a1, a2] = p; [[maybe_unused]] auto [a1, a2] = p;
SASSERT(a1 && a2); SASSERT(a1 && a2);
m_instantiated.erase(p); m_instantiated.erase(p);
m_clause2app_pair.erase(cls); m_clause2app_pair.erase(cls);
@ -365,7 +365,7 @@ namespace smt {
} }
app_triple tr(0,0,0); app_triple tr(0,0,0);
if (m_triple.m_clause2apps.find(cls, tr)) { if (m_triple.m_clause2apps.find(cls, tr)) {
auto [a1, a2, a3] = tr; [[maybe_unused]] auto [a1, a2, a3] = tr;
SASSERT(a1 && a2 && a3); SASSERT(a1 && a2 && a3);
m_triple.m_instantiated.erase(tr); m_triple.m_instantiated.erase(tr);
m_triple.m_clause2apps.erase(cls); m_triple.m_clause2apps.erase(cls);

View file

@ -2413,7 +2413,7 @@ namespace smt {
\warning This method will not invoke reset_cache_generation. \warning This method will not invoke reset_cache_generation.
*/ */
unsigned context::pop_scope_core(unsigned num_scopes) { unsigned context::pop_scope_core(unsigned num_scopes) {
unsigned units_to_reassert_lim; unsigned units_to_reassert_lim = 0;
try { try {
if (m.has_trace_stream() && !m_is_auxiliary) if (m.has_trace_stream() && !m_is_auxiliary)

View file

@ -3530,7 +3530,7 @@ public:
break; break;
} }
case equality_source: { case equality_source: {
auto [n1, n2] = m_equalities[idx]; [[maybe_unused]] auto [n1, n2] = m_equalities[idx];
SASSERT(n1 != nullptr); SASSERT(n1 != nullptr);
SASSERT(n2 != nullptr); SASSERT(n2 != nullptr);
m_eqs.push_back(m_equalities[idx]); m_eqs.push_back(m_equalities[idx]);

View file

@ -405,7 +405,14 @@ public:
if (CallDestructors) { if (CallDestructors) {
back().~T(); back().~T();
} }
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
reinterpret_cast<SZ *>(m_data)[SIZE_IDX]--; reinterpret_cast<SZ *>(m_data)[SIZE_IDX]--;
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
} }
vector& push_back(T const & elem) { vector& push_back(T const & elem) {