Skip to content

Commit 1f237ff

Browse files
authored
Merge pull request diffblue#2464 from tautschnig/vs-unused1
Remove unused parameters message_handler, ns
2 parents 7be54b8 + 4193f02 commit 1f237ff

6 files changed

+5
-19
lines changed

jbmc/src/janalyzer/janalyzer_parse_options.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ int janalyzer_parse_optionst::perform_analysis(const optionst &options)
587587
if(options.get_bool_option("show"))
588588
{
589589
result = static_show_domain(
590-
goto_model, *analyzer, options, get_message_handler(), out);
590+
goto_model, *analyzer, options, out);
591591
}
592592
else if(options.get_bool_option("verify"))
593593
{
@@ -602,17 +602,17 @@ int janalyzer_parse_optionst::perform_analysis(const optionst &options)
602602
else if(options.get_bool_option("unreachable-instructions"))
603603
{
604604
result = static_unreachable_instructions(
605-
goto_model, *analyzer, options, get_message_handler(), out);
605+
goto_model, *analyzer, options, out);
606606
}
607607
else if(options.get_bool_option("unreachable-functions"))
608608
{
609609
result = static_unreachable_functions(
610-
goto_model, *analyzer, options, get_message_handler(), out);
610+
goto_model, *analyzer, options, out);
611611
}
612612
else if(options.get_bool_option("reachable-functions"))
613613
{
614614
result = static_reachable_functions(
615-
goto_model, *analyzer, options, get_message_handler(), out);
615+
goto_model, *analyzer, options, out);
616616
}
617617
else
618618
{

src/goto-analyzer/goto_analyzer_parse_options.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,6 @@ int goto_analyzer_parse_optionst::perform_analysis(const optionst &options)
628628
result = static_show_domain(goto_model,
629629
*analyzer,
630630
options,
631-
get_message_handler(),
632631
out);
633632
}
634633
else if(options.get_bool_option("verify"))
@@ -652,23 +651,20 @@ int goto_analyzer_parse_optionst::perform_analysis(const optionst &options)
652651
result = static_unreachable_instructions(goto_model,
653652
*analyzer,
654653
options,
655-
get_message_handler(),
656654
out);
657655
}
658656
else if(options.get_bool_option("unreachable-functions"))
659657
{
660658
result = static_unreachable_functions(goto_model,
661659
*analyzer,
662660
options,
663-
get_message_handler(),
664661
out);
665662
}
666663
else if(options.get_bool_option("reachable-functions"))
667664
{
668665
result = static_reachable_functions(goto_model,
669666
*analyzer,
670667
options,
671-
get_message_handler(),
672668
out);
673669
}
674670
else

src/goto-analyzer/static_show_domain.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ Author: Martin Brain, [email protected]
1616
/// \param goto_model: the program analyzed
1717
/// \param ai: the abstract interpreter after it has been run to fix point
1818
/// \param options: the parsed user options
19-
/// \param message_handler: the system message handler
2019
/// \param out: output stream for the printing
2120
/// \return: false on success with the domain printed to out
2221
bool static_show_domain(
2322
const goto_modelt &goto_model,
2423
const ai_baset &ai,
2524
const optionst &options,
26-
message_handlert &message_handler,
2725
std::ostream &out)
2826
{
2927
if(options.get_bool_option("json"))

src/goto-analyzer/static_show_domain.h

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ bool static_show_domain(
2020
const goto_modelt &,
2121
const ai_baset &,
2222
const optionst &,
23-
message_handlert &,
2423
std::ostream &);
2524

2625
#endif // CPROVER_GOTO_ANALYZER_STATIC_SHOW_DOMAIN_H

src/goto-analyzer/unreachable_instructions.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ static void output_dead_plain(
8484
}
8585

8686
static void add_to_xml(
87-
const namespacet &ns,
8887
const goto_programt &goto_program,
8988
const dead_mapt &dead_map,
9089
xmlt &dest)
@@ -206,7 +205,6 @@ bool static_unreachable_instructions(
206205
const goto_modelt &goto_model,
207206
const ai_baset &ai,
208207
const optionst &options,
209-
message_handlert &message_handler,
210208
std::ostream &out)
211209
{
212210
json_arrayt json_result;
@@ -231,7 +229,7 @@ bool static_unreachable_instructions(
231229
}
232230
else if(options.get_bool_option("xml"))
233231
{
234-
add_to_xml(ns, f_it->second.body, dead_map, xml_result);
232+
add_to_xml(f_it->second.body, dead_map, xml_result);
235233
}
236234
else
237235
{
@@ -431,7 +429,6 @@ bool static_unreachable_functions(
431429
const goto_modelt &goto_model,
432430
const ai_baset &ai,
433431
const optionst &options,
434-
message_handlert &message_handler,
435432
std::ostream &out)
436433
{
437434
std::unordered_set<irep_idt> called =
@@ -446,7 +443,6 @@ bool static_reachable_functions(
446443
const goto_modelt &goto_model,
447444
const ai_baset &ai,
448445
const optionst &options,
449-
message_handlert &message_handler,
450446
std::ostream &out)
451447
{
452448
std::unordered_set<irep_idt> called =

src/goto-analyzer/unreachable_instructions.h

-3
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,18 @@ bool static_unreachable_instructions(
4040
const goto_modelt &,
4141
const ai_baset &,
4242
const optionst &,
43-
message_handlert &,
4443
std::ostream &);
4544

4645
bool static_unreachable_functions(
4746
const goto_modelt &,
4847
const ai_baset &,
4948
const optionst &,
50-
message_handlert &,
5149
std::ostream &);
5250

5351
bool static_reachable_functions(
5452
const goto_modelt &,
5553
const ai_baset &,
5654
const optionst &,
57-
message_handlert &,
5855
std::ostream &);
5956

6057
#endif // CPROVER_GOTO_ANALYZER_UNREACHABLE_INSTRUCTIONS_H

0 commit comments

Comments
 (0)