Skip to content

Commit 2ceb3e3

Browse files
authored
Merge pull request diffblue#4682 from hannes-steffenhagen-diffblue/fix/xml-output-precondition
Make check in XML output function a precondition
2 parents 1d021aa + af8c217 commit 2ceb3e3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/goto-analyzer/static_verifier.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static void static_verifier_xml(
6666
{
6767
m.status() << "Writing XML report" << messaget::eom;
6868

69-
xmlt xml_result;
69+
xmlt xml_result{"cprover"};
7070

7171
for(const auto &result : results)
7272
{

src/util/xml.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ void xmlt::output(std::ostream &out, unsigned indent) const
3434
// 'name' needs to be set, or we produce mal-formed
3535
// XML.
3636

37-
if(name.empty())
38-
return;
37+
PRECONDITION(!name.empty());
3938

4039
do_indent(out, indent);
4140

0 commit comments

Comments
 (0)