Skip to content

Commit 88917b5

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 61b3086 commit 88917b5

28 files changed

+115
-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
binary_relation_exprt is_bmp(chr, ID_le, from_integer(0xFFFF, chr.type()));
406409
return is_bmp;
407410
}
@@ -423,6 +426,7 @@ codet character_refine_preprocesst::convert_is_bmp_code_point(
423426
exprt character_refine_preprocesst::expr_of_is_defined(
424427
const exprt &chr, const typet &type)
425428
{
429+
(void)type; // unused parameter
426430
// The following intervals are undefined in unicode, according to
427431
// the Unicode Character Database: http://www.unicode.org/Public/UCD/latest/
428432
exprt::operandst intervals;
@@ -487,6 +491,7 @@ codet character_refine_preprocesst::convert_is_defined_int(
487491
exprt character_refine_preprocesst::expr_of_is_digit(
488492
const exprt &chr, const typet &type)
489493
{
494+
(void)type; // unused parameter
490495
exprt latin_digit=in_interval_expr(chr, '0', '9');
491496
exprt arabic_indic_digit=in_interval_expr(chr, 0x660, 0x669);
492497
exprt extended_digit=in_interval_expr(chr, 0x6F0, 0x6F9);
@@ -525,6 +530,7 @@ codet character_refine_preprocesst::convert_is_digit_int(
525530
exprt character_refine_preprocesst::expr_of_is_high_surrogate(
526531
const exprt &chr, const typet &type)
527532
{
533+
(void)type; // unused parameter
528534
return in_interval_expr(chr, 0xD800, 0xDBFF);
529535
}
530536

@@ -549,6 +555,7 @@ codet character_refine_preprocesst::convert_is_high_surrogate(
549555
exprt character_refine_preprocesst::expr_of_is_identifier_ignorable(
550556
const exprt &chr, const typet &type)
551557
{
558+
(void)type; // unused parameter
552559
or_exprt ignorable(
553560
in_interval_expr(chr, 0x0000, 0x0008),
554561
or_exprt(
@@ -776,6 +783,7 @@ codet character_refine_preprocesst::convert_is_low_surrogate(
776783
exprt character_refine_preprocesst::expr_of_is_mirrored(
777784
const exprt &chr, const typet &type)
778785
{
786+
(void)type; // unused parameter
779787
return in_list_expr(chr, {0x28, 0x29, 0x3C, 0x3E, 0x5B, 0x5D, 0x7B, 0x7D});
780788
}
781789

@@ -818,6 +826,7 @@ codet character_refine_preprocesst::convert_is_space(conversion_inputt &target)
818826
exprt character_refine_preprocesst::expr_of_is_space_char(
819827
const exprt &chr, const typet &type)
820828
{
829+
(void)type; // unused parameter
821830
std::list<mp_integer> space_characters=
822831
{0x20, 0x00A0, 0x1680, 0x202F, 0x205F, 0x3000, 0x2028, 0x2029};
823832
exprt condition0=in_list_expr(chr, space_characters);
@@ -852,6 +861,7 @@ codet character_refine_preprocesst::convert_is_space_char_int(
852861
exprt character_refine_preprocesst::expr_of_is_supplementary_code_point(
853862
const exprt &chr, const typet &type)
854863
{
864+
(void)type; // unused parameter
855865
return binary_relation_exprt(chr, ID_gt, from_integer(0xFFFF, chr.type()));
856866
}
857867

@@ -872,6 +882,7 @@ codet character_refine_preprocesst::convert_is_supplementary_code_point(
872882
exprt character_refine_preprocesst::expr_of_is_surrogate(
873883
const exprt &chr, const typet &type)
874884
{
885+
(void)type; // unused parameter
875886
return in_interval_expr(chr, 0xD800, 0xDFFF);
876887
}
877888

@@ -908,6 +919,7 @@ codet character_refine_preprocesst::convert_is_surrogate_pair(
908919
exprt character_refine_preprocesst::expr_of_is_title_case(
909920
const exprt &chr, const typet &type)
910921
{
922+
(void)type; // unused parameter
911923
std::list<mp_integer>title_case_chars=
912924
{0x01C5, 0x01C8, 0x01CB, 0x01F2, 0x1FBC, 0x1FCC, 0x1FFC};
913925
exprt::operandst conditions;
@@ -945,6 +957,7 @@ codet character_refine_preprocesst::convert_is_title_case_int(
945957
exprt character_refine_preprocesst::expr_of_is_letter_number(
946958
const exprt &chr, const typet &type)
947959
{
960+
(void)type; // unused parameter
948961
// The following set of characters is the general category "Nl" in the
949962
// Unicode specification.
950963
exprt cond0=in_interval_expr(chr, 0x16EE, 0x16F0);
@@ -1058,6 +1071,7 @@ codet character_refine_preprocesst::convert_is_upper_case_int(
10581071
exprt character_refine_preprocesst::expr_of_is_valid_code_point(
10591072
const exprt &chr, const typet &type)
10601073
{
1074+
(void)type; // unused parameter
10611075
return binary_relation_exprt(chr, ID_le, from_integer(0x10FFFF, chr.type()));
10621076
}
10631077

@@ -1082,6 +1096,7 @@ codet character_refine_preprocesst::convert_is_valid_code_point(
10821096
exprt character_refine_preprocesst::expr_of_is_whitespace(
10831097
const exprt &chr, const typet &type)
10841098
{
1099+
(void)type; // unused parameter
10851100
exprt::operandst conditions;
10861101
std::list<mp_integer> space_characters=
10871102
{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
@@ -357,6 +357,7 @@ static void instrument_end_thread(
357357
const symbol_tablet &symbol_table)
358358
{
359359
PRECONDITION(f_code.arguments().size() == 1);
360+
(void)symbol_table; // unused parameter
360361

361362
// Build id, used to construct appropriate labels.
362363
// 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
@@ -1178,6 +1178,12 @@ bool java_bytecode_languaget::to_expr(
11781178
java_bytecode_parser.clear();
11791179

11801180
return result;
1181+
#else
1182+
// unused parameters
1183+
(void)code;
1184+
(void)module;
1185+
(void)expr;
1186+
(void)ns;
11811187
#endif
11821188

11831189
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
@@ -538,6 +538,8 @@ static void merge_variable_table_entries(
538538
<< merge_into.var.name << "; new live range "
539539
<< merge_into.var.start_pc << '-'
540540
<< merge_into.var.start_pc + merge_into.var.length << '\n';
541+
#else
542+
(void)debug_out; // unused parameter
541543
#endif
542544

543545
// 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
@@ -229,6 +229,8 @@ bool constant_propagator_domaint::two_way_propagate_rec(
229229
{
230230
#ifdef DEBUG
231231
std::cout << "two_way_propagate_rec: " << format(expr) << '\n';
232+
#else
233+
(void)expr; // unused parameter
232234
#endif
233235

234236
bool change=false;
@@ -260,6 +262,8 @@ bool constant_propagator_domaint::two_way_propagate_rec(
260262
assign_rec(values, rhs, lhs, ns);
261263
change=values.meet(copy_values);
262264
}
265+
#else
266+
(void)cp; // unused parameter
263267
#endif
264268

265269
#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
@@ -183,6 +183,7 @@ void uncaught_exceptions_analysist::collect_uncaught_exceptions(
183183
void uncaught_exceptions_analysist::output(
184184
const goto_functionst &goto_functions) const
185185
{
186+
(void)goto_functions; // unused parameter
186187
#ifdef DEBUG
187188
forall_goto_functions(it, goto_functions)
188189
{

src/goto-analyzer/goto_analyzer_parse_options.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@ bool goto_analyzer_parse_optionst::process_goto_program(
746746
// add generic checks
747747
status() << "Generic Property Instrumentation" << eom;
748748
goto_check(options, goto_model);
749+
#else
750+
(void)options; // unused parameter
749751
#endif
750752

751753
// recalculate numbers, etc.

0 commit comments

Comments
 (0)