mirror of
https://github.com/Z3Prover/z3
synced 2025-04-10 19:27:06 +00:00
make use of warning_msg safe for formatting. Thanks to Scott McPeak for reporting
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
b11f9050e3
commit
9253ca9d86
src
api
ast
muz/rel
parsers/smt2
smt
util
|
@ -37,7 +37,7 @@ extern "C" {
|
|||
catch (z3_exception & ex) {
|
||||
// The error handler is only available for contexts
|
||||
// Just throw a warning.
|
||||
warning_msg(ex.msg());
|
||||
warning_msg("%s", ex.msg());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ extern "C" {
|
|||
catch (z3_exception & ex) {
|
||||
// The error handler is only available for contexts
|
||||
// Just throw a warning.
|
||||
warning_msg(ex.msg());
|
||||
warning_msg("%s", ex.msg());
|
||||
return Z3_FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ extern "C" {
|
|||
catch (z3_exception & ex) {
|
||||
// The error handler is only available for contexts
|
||||
// Just throw a warning.
|
||||
warning_msg(ex.msg());
|
||||
warning_msg("%s", ex.msg());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1965,7 +1965,7 @@ bool ast_manager::check_sorts(ast const * n) const {
|
|||
return true;
|
||||
}
|
||||
catch (ast_exception & ex) {
|
||||
warning_msg(ex.msg());
|
||||
warning_msg("%s", ex.msg());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ struct well_sorted_proc {
|
|||
strm << "Expected sort: " << mk_pp(expected_sort, m_manager) << "\n";
|
||||
strm << "Actual sort: " << mk_pp(actual_sort, m_manager) << "\n";
|
||||
strm << "Function sort: " << mk_pp(decl, m_manager) << ".";
|
||||
warning_msg(strm.str().c_str());
|
||||
warning_msg("%s", strm.str().c_str());
|
||||
m_error = true;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -391,7 +391,7 @@ namespace datalog {
|
|||
std::ostringstream buffer;
|
||||
buffer << "creating large table of size " << upper_bound;
|
||||
if (p) buffer << " for relation " << p->get_name();
|
||||
warning_msg(buffer.str().c_str());
|
||||
warning_msg("%s", buffer.str().c_str());
|
||||
}
|
||||
|
||||
for(table_element i = 0; i < upper_bound; i++) {
|
||||
|
|
|
@ -1034,7 +1034,7 @@ namespace smt2 {
|
|||
else {
|
||||
std::ostringstream str;
|
||||
str << "unknown attribute " << id;
|
||||
warning_msg(str.str().c_str());
|
||||
warning_msg("%s", str.str().c_str());
|
||||
next();
|
||||
// just consume the
|
||||
consume_sexpr();
|
||||
|
|
|
@ -250,7 +250,7 @@ namespace smt {
|
|||
std::stringstream msg;
|
||||
msg << "found non utvpi logic expression:\n" << mk_pp(n, get_manager()) << "\n";
|
||||
TRACE("utvpi", tout << msg.str(););
|
||||
warning_msg(msg.str().c_str());
|
||||
warning_msg("%s", msg.str().c_str());
|
||||
get_context().push_trail(value_trail<context, bool>(m_non_utvpi_exprs));
|
||||
m_non_utvpi_exprs = true;
|
||||
}
|
||||
|
|
|
@ -167,4 +167,3 @@ void warning_msg(const char * msg, ...) {
|
|||
va_end(args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue