Skip to content

Commit c013400

Browse files
Remove unecessary log argument in cbmc_parse_optionst
The messaget can be constructed from the message_handler.
1 parent 6a72484 commit c013400

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ int cbmc_parse_optionst::doit()
547547
}
548548

549549
int get_goto_program_ret =
550-
get_goto_program(goto_model, options, cmdline, log, ui_message_handler);
550+
get_goto_program( goto_model, options, cmdline, ui_message_handler);
551551

552552
if(get_goto_program_ret!=-1)
553553
return get_goto_program_ret;
@@ -689,15 +689,15 @@ bool cbmc_parse_optionst::set_properties()
689689
}
690690

691691
int cbmc_parse_optionst::get_goto_program(
692-
goto_modelt &goto_model,
693-
const optionst &options,
694-
const cmdlinet &cmdline,
695-
messaget &log,
696-
ui_message_handlert &ui_message_handler)
692+
goto_modelt &goto_model,
693+
const optionst &options,
694+
const cmdlinet &cmdline,
695+
ui_message_handlert &ui_message_handler)
697696
{
697+
messaget log{ui_message_handler};
698698
if(cmdline.args.empty())
699699
{
700-
log.error() << "Please provide a program to verify" << log.eom;
700+
log.error() << "Please provide a program to verify" << messaget::eom;
701701
return CPROVER_EXIT_INCORRECT_TASK;
702702
}
703703

@@ -739,7 +739,7 @@ int cbmc_parse_optionst::get_goto_program(
739739
return CPROVER_EXIT_SUCCESS;
740740
}
741741

742-
log.status() << config.object_bits_info() << log.eom;
742+
log.status() << config.object_bits_info() << messaget::eom;
743743
}
744744

745745
return -1; // no error, continue

src/cbmc/cbmc_parse_options.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,10 @@ class cbmc_parse_optionst : public parse_options_baset, public xml_interfacet
103103
static bool process_goto_program(goto_modelt &, const optionst &, messaget &);
104104

105105
static int get_goto_program(
106-
goto_modelt &,
107-
const optionst &,
108-
const cmdlinet &,
109-
messaget &,
110-
ui_message_handlert &);
106+
goto_modelt &,
107+
const optionst &,
108+
const cmdlinet &,
109+
ui_message_handlert &);
111110

112111
protected:
113112
goto_modelt goto_model;

unit/compound_block_locations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ void compound_block_locationst::check_compound_block_locations(
289289

290290
goto_modelt gm;
291291
int ret;
292-
ret = cbmc_parse_optionst::get_goto_program(gm, opts, cmdline, log, mh);
292+
ret = cbmc_parse_optionst::get_goto_program(gm, opts, cmdline, mh);
293293
REQUIRE(ret == -1);
294294

295295
const auto found = gm.goto_functions.function_map.find("main");

unit/path_strategies.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ void _check_with_strategy(
398398
goto_modelt goto_model;
399399
int ret;
400400
ret = cbmc_parse_optionst::get_goto_program(
401-
goto_model, options, cmdline, log, ui_message_handler);
401+
goto_model, options, cmdline, ui_message_handler);
402402
REQUIRE(ret == -1);
403403

404404
symbol_tablet symex_symbol_table;

0 commit comments

Comments
 (0)