From 86b97186b0a4b3a8f8a041f2443b540952a5c530 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Mon, 30 Sep 2024 15:51:48 -0700 Subject: [PATCH] fix build warnings --- src/muz/fp/datalog_parser.cpp | 26 +++++++++----------------- src/smt/theory_str.cpp | 2 ++ 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/muz/fp/datalog_parser.cpp b/src/muz/fp/datalog_parser.cpp index 4d8f60121b1..a15c8060907 100644 --- a/src/muz/fp/datalog_parser.cpp +++ b/src/muz/fp/datalog_parser.cpp @@ -228,20 +228,20 @@ class reserved_symbols { class dlexer { - std::istream* m_input; - char_reader* m_reader; - char m_prev_char; - char m_curr_char; - int m_line; - int m_pos; - int m_tok_pos; + std::istream* m_input = nullptr; + char_reader* m_reader = nullptr; + int m_prev_char = 0; + int m_curr_char = 0; + int m_line = 1; + int m_pos = 0; + int m_tok_pos = 0; string_buffer<> m_buffer; reserved_symbols m_reserved_symbols; public: //when parsing domains, we want '.' character to be allowed in IDs, but elsewhere //we don't (because of the "y." in rules like "P(x,y):-x=y.") - bool m_parsing_domains; + bool m_parsing_domains = false; bool eos() const { return m_curr_char == EOF; @@ -267,15 +267,7 @@ class dlexer { next(); } - dlexer(): - m_input(nullptr), - m_reader(nullptr), - m_prev_char(0), - m_curr_char(0), - m_line(1), - m_pos(0), - m_tok_pos(0), - m_parsing_domains(false) { + dlexer() { } void set_stream(std::istream* s, char_reader* r) { diff --git a/src/smt/theory_str.cpp b/src/smt/theory_str.cpp index 1e12f8bd351..61f6ec644ca 100644 --- a/src/smt/theory_str.cpp +++ b/src/smt/theory_str.cpp @@ -4089,6 +4089,7 @@ namespace smt { expr_ref_vector arrangement_disjunction(mgr); int pos = 1; + (void)pos; for (unsigned int i = 0; i <= strValue.length(); i++) { zstring part1Str = strValue.extract(0, i); zstring part2Str = strValue.extract(i, strValue.length() - i); @@ -4522,6 +4523,7 @@ namespace smt { expr_ref_vector arrangement_disjunction(mgr); int pos = 1; + (void)pos; if (!avoidLoopCut || !has_self_cut(m, y)) { expr_ref_vector and_item(mgr);