diff --git a/src/api/api_config_params.cpp b/src/api/api_config_params.cpp index 5b385a872..a04a9f12c 100644 --- a/src/api/api_config_params.cpp +++ b/src/api/api_config_params.cpp @@ -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()); } } diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp index 507f75482..4e505f977 100644 --- a/src/ast/ast.cpp +++ b/src/ast/ast.cpp @@ -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; } } diff --git a/src/ast/well_sorted.cpp b/src/ast/well_sorted.cpp index f9f04a2df..cb9ee3f61 100644 --- a/src/ast/well_sorted.cpp +++ b/src/ast/well_sorted.cpp @@ -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; } diff --git a/src/muz/rel/dl_base.cpp b/src/muz/rel/dl_base.cpp index b7f4d6cef..f79f6c8eb 100644 --- a/src/muz/rel/dl_base.cpp +++ b/src/muz/rel/dl_base.cpp @@ -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++) { diff --git a/src/parsers/smt2/smt2parser.cpp b/src/parsers/smt2/smt2parser.cpp index 17a931cc3..00f63afd5 100644 --- a/src/parsers/smt2/smt2parser.cpp +++ b/src/parsers/smt2/smt2parser.cpp @@ -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(); diff --git a/src/smt/theory_utvpi_def.h b/src/smt/theory_utvpi_def.h index d5ed4e825..ff295d5a3 100644 --- a/src/smt/theory_utvpi_def.h +++ b/src/smt/theory_utvpi_def.h @@ -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(m_non_utvpi_exprs)); m_non_utvpi_exprs = true; } diff --git a/src/util/warning.cpp b/src/util/warning.cpp index 1105a12f7..ed4cd8725 100644 --- a/src/util/warning.cpp +++ b/src/util/warning.cpp @@ -167,4 +167,3 @@ void warning_msg(const char * msg, ...) { va_end(args); } } -