From 156a7da4d1bbf383ba4ecc483a4c88d980940166 Mon Sep 17 00:00:00 2001 From: Lev Nachmanson Date: Mon, 2 Feb 2026 16:45:01 -1000 Subject: [PATCH] remove warnings Signed-off-by: Lev Nachmanson --- src/nlsat/levelwise.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/nlsat/levelwise.cpp b/src/nlsat/levelwise.cpp index 28112cea1..1a6583c9f 100644 --- a/src/nlsat/levelwise.cpp +++ b/src/nlsat/levelwise.cpp @@ -672,7 +672,7 @@ namespace nlsat { for (unsigned i = 1; i < both.size(); ++i) if (both[i].upper_rf < both[upper_root_idx].upper_rf) upper_root_idx = i; - unsigned lower_root_idx = both.size() - 1; + (void)upper_root_idx; // used in DEBUG_CODE below // Process in order of lower_rf // First element (index 0) has min lower_rf @@ -693,7 +693,9 @@ namespace nlsat { } - // Check arborescence invariants + // Check arborescence invariants (used in debug via SASSERT) + DEBUG_CODE( + unsigned lower_root_idx = both.size() - 1; auto arb_invariant = [&]() { // Reconstruct parent[] from the algorithm logic std_vector parent(both.size(), UINT_MAX); @@ -780,7 +782,7 @@ namespace nlsat { return true; }; - SASSERT(arb_invariant()); + SASSERT(arb_invariant());); } // Sector spanning tree heuristic: