Skip to content

Commit 8c0bc62

Browse files
committed
Silence warnings about unused parameters
Their names are useful to understand the purpose of the function and/or are part of Doxygen documentation, and thus cannot be removed.
1 parent 1063983 commit 8c0bc62

28 files changed

+114
-10
lines changed

jbmc/src/java_bytecode/character_refine_preprocess.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ codet character_refine_preprocesst::convert_high_surrogate(
338338
exprt character_refine_preprocesst::expr_of_is_ascii_lower_case(
339339
const exprt &chr, const typet &type)
340340
{
341+
(void)type; // unused parameter
341342
return in_interval_expr(chr, 'a', 'z');
342343
}
343344

@@ -348,6 +349,7 @@ exprt character_refine_preprocesst::expr_of_is_ascii_lower_case(
348349
exprt character_refine_preprocesst::expr_of_is_ascii_upper_case(
349350
const exprt &chr, const typet &type)
350351
{
352+
(void)type; // unused parameter
351353
return in_interval_expr(chr, 'A', 'Z');
352354
}
353355

@@ -402,6 +404,7 @@ codet character_refine_preprocesst::convert_is_alphabetic(
402404
exprt character_refine_preprocesst::expr_of_is_bmp_code_point(
403405
const exprt &chr, const typet &type)
404406
{
407+
(void)type; // unused parameter
405408
return and_exprt(
406409
binary_relation_exprt(chr, ID_le, from_integer(0xFFFF, chr.type())),
407410
binary_relation_exprt(chr, ID_ge, from_integer(0, chr.type())));
@@ -424,6 +427,7 @@ codet character_refine_preprocesst::convert_is_bmp_code_point(
424427
exprt character_refine_preprocesst::expr_of_is_defined(
425428
const exprt &chr, const typet &type)
426429
{
430+
(void)type; // unused parameter
427431
// The following intervals are undefined in unicode, according to
428432
// the Unicode Character Database: http://www.unicode.org/Public/UCD/latest/
429433
exprt::operandst intervals;
@@ -488,6 +492,7 @@ codet character_refine_preprocesst::convert_is_defined_int(
488492
exprt character_refine_preprocesst::expr_of_is_digit(
489493
const exprt &chr, const typet &type)
490494
{
495+
(void)type; // unused parameter
491496
exprt latin_digit=in_interval_expr(chr, '0', '9');
492497
exprt arabic_indic_digit=in_interval_expr(chr, 0x660, 0x669);
493498
exprt extended_digit=in_interval_expr(chr, 0x6F0, 0x6F9);
@@ -526,6 +531,7 @@ codet character_refine_preprocesst::convert_is_digit_int(
526531
exprt character_refine_preprocesst::expr_of_is_high_surrogate(
527532
const exprt &chr, const typet &type)
528533
{
534+
(void)type; // unused parameter
529535
return in_interval_expr(chr, 0xD800, 0xDBFF);
530536
}
531537

@@ -550,6 +556,7 @@ codet character_refine_preprocesst::convert_is_high_surrogate(
550556
exprt character_refine_preprocesst::expr_of_is_identifier_ignorable(
551557
const exprt &chr, const typet &type)
552558
{
559+
(void)type; // unused parameter
553560
or_exprt ignorable(
554561
in_interval_expr(chr, 0x0000, 0x0008),
555562
or_exprt(
@@ -777,6 +784,7 @@ codet character_refine_preprocesst::convert_is_low_surrogate(
777784
exprt character_refine_preprocesst::expr_of_is_mirrored(
778785
const exprt &chr, const typet &type)
779786
{
787+
(void)type; // unused parameter
780788
return in_list_expr(chr, {0x28, 0x29, 0x3C, 0x3E, 0x5B, 0x5D, 0x7B, 0x7D});
781789
}
782790

@@ -819,6 +827,7 @@ codet character_refine_preprocesst::convert_is_space(conversion_inputt &target)
819827
exprt character_refine_preprocesst::expr_of_is_space_char(
820828
const exprt &chr, const typet &type)
821829
{
830+
(void)type; // unused parameter
822831
std::list<mp_integer> space_characters=
823832
{0x20, 0x00A0, 0x1680, 0x202F, 0x205F, 0x3000, 0x2028, 0x2029};
824833
exprt condition0=in_list_expr(chr, space_characters);
@@ -853,6 +862,7 @@ codet character_refine_preprocesst::convert_is_space_char_int(
853862
exprt character_refine_preprocesst::expr_of_is_supplementary_code_point(
854863
const exprt &chr, const typet &type)
855864
{
865+
(void)type; // unused parameter
856866
return binary_relation_exprt(chr, ID_gt, from_integer(0xFFFF, chr.type()));
857867
}
858868

@@ -873,6 +883,7 @@ codet character_refine_preprocesst::convert_is_supplementary_code_point(
873883
exprt character_refine_preprocesst::expr_of_is_surrogate(
874884
const exprt &chr, const typet &type)
875885
{
886+
(void)type; // unused parameter
876887
return in_interval_expr(chr, 0xD800, 0xDFFF);
877888
}
878889

@@ -909,6 +920,7 @@ codet character_refine_preprocesst::convert_is_surrogate_pair(
909920
exprt character_refine_preprocesst::expr_of_is_title_case(
910921
const exprt &chr, const typet &type)
911922
{
923+
(void)type; // unused parameter
912924
std::list<mp_integer>title_case_chars=
913925
{0x01C5, 0x01C8, 0x01CB, 0x01F2, 0x1FBC, 0x1FCC, 0x1FFC};
914926
exprt::operandst conditions;
@@ -946,6 +958,7 @@ codet character_refine_preprocesst::convert_is_title_case_int(
946958
exprt character_refine_preprocesst::expr_of_is_letter_number(
947959
const exprt &chr, const typet &type)
948960
{
961+
(void)type; // unused parameter
949962
// The following set of characters is the general category "Nl" in the
950963
// Unicode specification.
951964
exprt cond0=in_interval_expr(chr, 0x16EE, 0x16F0);
@@ -1059,6 +1072,7 @@ codet character_refine_preprocesst::convert_is_upper_case_int(
10591072
exprt character_refine_preprocesst::expr_of_is_valid_code_point(
10601073
const exprt &chr, const typet &type)
10611074
{
1075+
(void)type; // unused parameter
10621076
return binary_relation_exprt(chr, ID_le, from_integer(0x10FFFF, chr.type()));
10631077
}
10641078

@@ -1083,6 +1097,7 @@ codet character_refine_preprocesst::convert_is_valid_code_point(
10831097
exprt character_refine_preprocesst::expr_of_is_whitespace(
10841098
const exprt &chr, const typet &type)
10851099
{
1100+
(void)type; // unused parameter
10861101
exprt::operandst conditions;
10871102
std::list<mp_integer> space_characters=
10881103
{0x20, 0x1680, 0x205F, 0x3000, 0x2028, 0x2029};

jbmc/src/java_bytecode/java_bytecode_concurrency_instrumentation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ static void instrument_end_thread(
342342
const symbol_tablet &symbol_table)
343343
{
344344
PRECONDITION(f_code.arguments().size() == 1);
345+
(void)symbol_table; // unused parameter
345346

346347
// Build id, used to construct appropriate labels.
347348
// Note: java does not have labels so this should be safe

jbmc/src/java_bytecode/java_bytecode_language.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,12 @@ bool java_bytecode_languaget::to_expr(
12341234
java_bytecode_parser.clear();
12351235

12361236
return result;
1237+
#else
1238+
// unused parameters
1239+
(void)code;
1240+
(void)module;
1241+
(void)expr;
1242+
(void)ns;
12371243
#endif
12381244

12391245
return true; // fail for now

jbmc/src/java_bytecode/java_bytecode_typecheck.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ bool java_bytecode_typecheck(
119119
}
120120

121121
return java_bytecode_typecheck.get_error_found();
122+
#else
123+
// unused parameters
124+
(void)expr;
125+
(void)message_handler;
126+
(void)ns;
122127
#endif
123128

124129
// fail for now

jbmc/src/java_bytecode/java_enum_static_init_unwind_handler.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ tvt java_enum_static_init_unwind_handler(
7070
unsigned &unwind_max,
7171
const symbol_tablet &symbol_table)
7272
{
73+
(void)loop_number; // unused parameter
74+
7375
const irep_idt enum_function_id = find_enum_function_on_stack(context);
7476
if(enum_function_id.empty())
7577
return tvt::unknown();

jbmc/src/java_bytecode/java_local_variable_table.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,8 @@ static void merge_variable_table_entries(
549549
<< merge_into.var.name << "; new live range "
550550
<< merge_into.var.start_pc << '-'
551551
<< merge_into.var.start_pc + merge_into.var.length << '\n';
552+
#else
553+
(void)debug_out; // unused parameter
552554
#endif
553555

554556
// Nuke the now-subsumed var-table entries:

src/analyses/constant_propagator.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ bool constant_propagator_domaint::two_way_propagate_rec(
237237
{
238238
#ifdef DEBUG
239239
std::cout << "two_way_propagate_rec: " << format(expr) << '\n';
240+
#else
241+
(void)expr; // unused parameter
240242
#endif
241243

242244
bool change=false;
@@ -268,6 +270,8 @@ bool constant_propagator_domaint::two_way_propagate_rec(
268270
assign_rec(values, rhs, lhs, ns);
269271
change = values.meet(copy_values, ns);
270272
}
273+
#else
274+
(void)cp; // unused parameter
271275
#endif
272276

273277
#ifdef DEBUG

src/analyses/local_may_alias.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ void local_may_aliast::build(const goto_functiont &goto_function)
328328

329329
loc_infos.resize(cfg.nodes.size());
330330

331+
(void)goto_function; // unused parameter
331332
#if 0
332333
// feed in sufficiently bad defaults
333334
for(code_typet::parameterst::const_iterator

src/analyses/uncaught_exceptions_analysis.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ void uncaught_exceptions_analysist::collect_uncaught_exceptions(
182182
void uncaught_exceptions_analysist::output(
183183
const goto_functionst &goto_functions) const
184184
{
185+
(void)goto_functions; // unused parameter
185186
#ifdef DEBUG
186187
forall_goto_functions(it, goto_functions)
187188
{

src/goto-analyzer/goto_analyzer_parse_options.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,8 @@ bool goto_analyzer_parse_optionst::process_goto_program(
749749
// add generic checks
750750
status() << "Generic Property Instrumentation" << eom;
751751
goto_check(options, goto_model);
752+
#else
753+
(void)options; // unused parameter
752754
#endif
753755

754756
// recalculate numbers, etc.

0 commit comments

Comments
 (0)