Skip to content

Commit 5cabcea

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 9480092 commit 5cabcea

27 files changed

+96
-9
lines changed

jbmc/src/java_bytecode/character_refine_preprocess.cpp

+15
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
10851100
exprt::operandst conditions;
10861101
std::list<mp_integer> space_characters=
10871102
{0x20, 0x1680, 0x205F, 0x3000, 0x2028, 0x2029};

jbmc/src/java_bytecode/java_bytecode_language.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,11 @@ bool java_bytecode_languaget::to_expr(
11551155
java_bytecode_parser.clear();
11561156

11571157
return result;
1158+
#else
1159+
(void)code;
1160+
(void)module;
1161+
(void)expr;
1162+
(void)ns;
11581163
#endif
11591164

11601165
return true; // fail for now

jbmc/src/java_bytecode/java_bytecode_typecheck.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ bool java_bytecode_typecheck(
119119
}
120120

121121
return java_bytecode_typecheck.get_error_found();
122+
#else
123+
(void)expr;
124+
(void)message_handler;
125+
(void)ns;
122126
#endif
123127

124128
// fail for now

jbmc/src/java_bytecode/java_enum_static_init_unwind_handler.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ tvt java_enum_static_init_unwind_handler(
3535
unsigned &unwind_max,
3636
const symbol_tablet &symbol_table)
3737
{
38+
(void)loop_number;
39+
3840
const std::string &function_str = id2string(function_id);
3941
if(!has_suffix(function_str, ".<clinit>:()V"))
4042
return tvt::unknown();

jbmc/src/java_bytecode/java_local_variable_table.cpp

+2
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;
541543
#endif
542544

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

src/analyses/ai.h

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ class ai_domain_baset
114114
exprt &condition,
115115
const namespacet &ns) const
116116
{
117+
(void)condition;
117118
return true;
118119
}
119120

src/analyses/constant_propagator.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ bool constant_propagator_domaint::two_way_propagate_rec(
224224
{
225225
#ifdef DEBUG
226226
std::cout << "two_way_propagate_rec: " << format(expr) << '\n';
227+
#else
228+
(void)expr;
227229
#endif
228230

229231
bool change=false;

src/analyses/local_may_alias.cpp

+1
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;
331332
#if 0
332333
// feed in sufficiently bad defaults
333334
for(code_typet::parameterst::const_iterator

src/analyses/uncaught_exceptions_analysis.cpp

+1
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;
186187
#ifdef DEBUG
187188
forall_goto_functions(it, goto_functions)
188189
{

src/goto-analyzer/goto_analyzer_parse_options.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,8 @@ bool goto_analyzer_parse_optionst::process_goto_program(
752752
// add generic checks
753753
status() << "Generic Property Instrumentation" << eom;
754754
goto_check(options, goto_model);
755+
#else
756+
(void)options;
755757
#endif
756758

757759
// recalculate numbers, etc.

src/goto-cc/hybrid_binary.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ int hybrid_binary(
9393
}
9494

9595
#else
96+
(void)compiler_or_linker;
97+
(void)goto_binary_file;
98+
(void)output_file;
9699
message.error() << "binary merging not implemented for this platform"
97100
<< messaget::eom;
98101
result = 1;

src/goto-instrument/accelerate/polynomial_accelerator.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ bool polynomial_acceleratort::fit_const(
447447
exprt &target,
448448
polynomialt &poly)
449449
{
450+
(void)body;
451+
(void)target;
452+
(void)poly;
450453
return false;
451454

452455
#if 0

src/goto-instrument/accelerate/scratch_program.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ void scratch_programt::append_loop(
186186
append(program);
187187

188188
// Update any back jumps to the loop header.
189+
(void)loop_header;
189190
assume(false_exprt());
190191

191192
goto_programt::targett end=add_instruction(SKIP);

src/goto-instrument/cover_basic_blocks.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Author: Daniel Kroening
1414

1515
#include <unordered_set>
1616

17-
#include <goto-programs/goto_model.h>
17+
#include <util/message.h>
1818

19-
class message_handlert;
19+
#include <goto-programs/goto_model.h>
2020

2121
class cover_blocks_baset
2222
{
@@ -49,6 +49,8 @@ class cover_blocks_baset
4949
const goto_programt &goto_program,
5050
message_handlert &message_handler)
5151
{
52+
(void)goto_program;
53+
(void)message_handler;
5254
}
5355
};
5456

src/goto-instrument/cover_filter.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ bool include_pattern_filtert::operator()(
5151
const irep_idt &identifier,
5252
const goto_functionst::goto_functiont &goto_function) const
5353
{
54+
(void)goto_function;
5455
std::smatch string_matcher;
5556
return std::regex_match(id2string(identifier), string_matcher, regex_matcher);
5657
}
@@ -67,6 +68,7 @@ bool trivial_functions_filtert::operator()(
6768
const irep_idt &identifier,
6869
const goto_functionst::goto_functiont &goto_function) const
6970
{
71+
(void)identifier;
7072
unsigned long count_assignments = 0, count_goto = 0;
7173
forall_goto_program_instructions(i_it, goto_function.body)
7274
{

src/goto-instrument/full_slicer_class.h

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ class full_slicert
9999
{
100100
#ifdef DEBUG_FULL_SLICERT
101101
cfg[entry].required_by.insert(reason->location_number);
102+
#else
103+
(void)reason;
102104
#endif
103105
queue.push(entry);
104106
}

src/goto-instrument/wmm/data_dp.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,7 @@ void data_dpt::print(messaget &message)
185185
for(l_it=m_it->second.begin(); l_it!=m_it->second.end(); ++l_it)
186186
message.debug()<< "loc: "<<*l_it << messaget::eom;
187187
}
188+
#else
189+
(void)message;
188190
#endif
189191
}

src/goto-instrument/wmm/instrumenter_strategies.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ void inline instrumentert::instrument_minimum_interference_inserter(
344344

345345
glp_delete_prob(lp);
346346
#else
347+
(void)set_of_cycles;
347348
throw "sorry, minimum interference option requires glpk; "
348349
"please recompile goto-instrument with glpk";
349350
#endif

src/goto-instrument/wmm/shared_buffers.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,12 @@ void shared_bufferst::flush_read(
266266

267267
assignment(goto_program, target, source_location, vars.read_delayed,
268268
false_exprt());
269+
#else
270+
(void)goto_program;
271+
(void)target;
272+
(void)target;
273+
(void)source_location;
274+
(void)write_object;
269275
#endif
270276

271277
/* option 2 */

src/goto-programs/osx_fat_reader.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ bool is_osx_fat_magic(char hdr[4])
2929
case FAT_CIGAM:
3030
return true;
3131
}
32+
#else
33+
(void)hdr;
3234
#endif
3335

3436
return false;
@@ -70,6 +72,8 @@ osx_fat_readert::osx_fat_readert(std::ifstream &in) :
7072
cpusubtype==CPU_SUBTYPE_HPPA_7100LC &&
7173
size > 0;
7274
}
75+
#else
76+
(void)in;
7377
#endif
7478
}
7579

src/langapi/language.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ irep_idt languaget::generate_opaque_stub_body(
115115
symbolt &symbol,
116116
symbol_tablet &symbol_table)
117117
{
118+
(void)symbol;
119+
(void)symbol_table;
118120
return ID_nil;
119121
}
120122

@@ -131,6 +133,9 @@ parameter_symbolt languaget::build_stub_parameter_symbol(
131133
size_t parameter_index,
132134
const code_typet::parametert &parameter)
133135
{
136+
(void)function_symbol;
137+
(void)parameter_index;
138+
(void)parameter;
134139
error() << "language " << id()
135140
<< " doesn't implement build_stub_parameter_symbol. "
136141
<< "This means cannot use opaque functions." << eom;

0 commit comments

Comments
 (0)