Skip to content

Commit 61b3086

Browse files
authored
Merge pull request #2468 from tautschnig/vs-names
Remove names of unused parameters
2 parents 7bfd36b + 3785941 commit 61b3086

File tree

93 files changed

+224
-228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+224
-228
lines changed

jbmc/src/java_bytecode/java_bytecode_language.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -165,23 +165,23 @@ std::set<std::string> java_bytecode_languaget::extensions() const
165165
return { "class", "jar" };
166166
}
167167

168-
void java_bytecode_languaget::modules_provided(std::set<std::string> &modules)
168+
void java_bytecode_languaget::modules_provided(std::set<std::string> &)
169169
{
170170
// modules.insert(translation_unit(parse_path));
171171
}
172172

173173
/// ANSI-C preprocessing
174174
bool java_bytecode_languaget::preprocess(
175-
std::istream &instream,
176-
const std::string &path,
177-
std::ostream &outstream)
175+
std::istream &,
176+
const std::string &,
177+
std::ostream &)
178178
{
179179
// there is no preprocessing!
180180
return true;
181181
}
182182

183183
bool java_bytecode_languaget::parse(
184-
std::istream &instream,
184+
std::istream &,
185185
const std::string &path)
186186
{
187187
PRECONDITION(language_options_initialized);
@@ -601,7 +601,7 @@ static void create_stub_global_symbols(
601601

602602
bool java_bytecode_languaget::typecheck(
603603
symbol_tablet &symbol_table,
604-
const std::string &module)
604+
const std::string &)
605605
{
606606
PRECONDITION(language_options_initialized);
607607

@@ -1089,7 +1089,7 @@ bool java_bytecode_languaget::convert_single_method(
10891089
return true;
10901090
}
10911091

1092-
bool java_bytecode_languaget::final(symbol_table_baset &symbol_table)
1092+
bool java_bytecode_languaget::final(symbol_table_baset &)
10931093
{
10941094
PRECONDITION(language_options_initialized);
10951095
return false;

jbmc/src/java_bytecode/java_types.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ inline annotated_typet &to_annotated_type(typet &type)
9393
}
9494

9595
template <>
96-
inline bool can_cast_type<annotated_typet>(const typet &type)
96+
inline bool can_cast_type<annotated_typet>(const typet &)
9797
{
9898
return true;
9999
}

jbmc/src/java_bytecode/remove_exceptions.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ void remove_exceptions(
616616
remove_exceptions_typest type)
617617
{
618618
remove_exceptionst::function_may_throwt any_function_may_throw =
619-
[](const irep_idt &id) { return true; };
619+
[](const irep_idt &) { return true; };
620620

621621
remove_exceptionst remove_exceptions(
622622
symbol_table,

src/analyses/ai.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ bool ai_baset::do_function_call(
319319
locationt l_call, locationt l_return,
320320
const goto_functionst &goto_functions,
321321
const goto_functionst::function_mapt::const_iterator f_it,
322-
const exprt::operandst &arguments,
322+
const exprt::operandst &,
323323
const namespacet &ns)
324324
{
325325
// initialize state, if necessary

src/analyses/ai.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,10 @@ class ait:public ai_baset
385385

386386
// not implemented in sequential analyses
387387
bool merge_shared(
388-
const statet &src,
389-
goto_programt::const_targett from,
390-
goto_programt::const_targett to,
391-
const namespacet &ns) override
388+
const statet &,
389+
goto_programt::const_targett,
390+
goto_programt::const_targett,
391+
const namespacet &) override
392392
{
393393
throw "not implemented";
394394
}

src/analyses/constant_propagator.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ void constant_propagator_domaint::transform(
224224
/// handles equalities and conjunctions containing equalities
225225
bool constant_propagator_domaint::two_way_propagate_rec(
226226
const exprt &expr,
227-
const namespacet &ns,
227+
const namespacet &,
228228
const constant_propagator_ait *cp)
229229
{
230230
#ifdef DEBUG
@@ -391,7 +391,7 @@ void constant_propagator_domaint::valuest::output(
391391

392392
void constant_propagator_domaint::output(
393393
std::ostream &out,
394-
const ai_baset &ai,
394+
const ai_baset &,
395395
const namespacet &ns) const
396396
{
397397
values.output(out, ns);
@@ -503,8 +503,8 @@ bool constant_propagator_domaint::valuest::meet(const valuest &src)
503503
/// \return Return true if "this" has changed.
504504
bool constant_propagator_domaint::merge(
505505
const constant_propagator_domaint &other,
506-
locationt from,
507-
locationt to)
506+
locationt,
507+
locationt)
508508
{
509509
return values.merge(other.values);
510510
}

src/analyses/custom_bitvector_analysis.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ void custom_bitvector_domaint::transform(
545545
void custom_bitvector_domaint::output(
546546
std::ostream &out,
547547
const ai_baset &ai,
548-
const namespacet &ns) const
548+
const namespacet &) const
549549
{
550550
if(has_values.is_known())
551551
{
@@ -591,8 +591,8 @@ void custom_bitvector_domaint::output(
591591

592592
bool custom_bitvector_domaint::merge(
593593
const custom_bitvector_domaint &b,
594-
locationt from,
595-
locationt to)
594+
locationt,
595+
locationt)
596596
{
597597
bool changed=has_values.is_false();
598598
has_values=tvt::unknown();

src/analyses/dependence_graph.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Date: August 2013
2424

2525
bool dep_graph_domaint::merge(
2626
const dep_graph_domaint &src,
27-
goto_programt::const_targett from,
28-
goto_programt::const_targett to)
27+
goto_programt::const_targett,
28+
goto_programt::const_targett)
2929
{
3030
// An abstract state at location `to` may be non-bottom even if
3131
// `merge(..., `to`) has not been called so far. This is due to the special
@@ -151,7 +151,7 @@ static bool may_be_def_use_pair(
151151
}
152152

153153
void dep_graph_domaint::data_dependencies(
154-
goto_programt::const_targett from,
154+
goto_programt::const_targett,
155155
goto_programt::const_targett to,
156156
dependence_grapht &dep_graph,
157157
const namespacet &ns)
@@ -237,8 +237,8 @@ void dep_graph_domaint::transform(
237237

238238
void dep_graph_domaint::output(
239239
std::ostream &out,
240-
const ai_baset &ai,
241-
const namespacet &ns) const
240+
const ai_baset &,
241+
const namespacet &) const
242242
{
243243
if(!control_deps.empty())
244244
{
@@ -275,8 +275,8 @@ void dep_graph_domaint::output(
275275
/// \par parameters: The abstract interpreter and the namespace.
276276
/// \return The domain, formatted as a JSON object.
277277
jsont dep_graph_domaint::output_json(
278-
const ai_baset &ai,
279-
const namespacet &ns) const
278+
const ai_baset &,
279+
const namespacet &) const
280280
{
281281
json_arrayt graph;
282282

src/analyses/escape_analysis.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ void escape_domaint::get_rhs_aliases_address_of(
163163

164164
void escape_domaint::transform(
165165
locationt from,
166-
locationt to,
167-
ai_baset &ai,
168-
const namespacet &ns)
166+
locationt,
167+
ai_baset &,
168+
const namespacet &)
169169
{
170170
if(has_values.is_false())
171171
return;
@@ -255,8 +255,8 @@ void escape_domaint::transform(
255255

256256
void escape_domaint::output(
257257
std::ostream &out,
258-
const ai_baset &ai,
259-
const namespacet &ns) const
258+
const ai_baset &,
259+
const namespacet &) const
260260
{
261261
if(has_values.is_known())
262262
{
@@ -301,8 +301,8 @@ void escape_domaint::output(
301301

302302
bool escape_domaint::merge(
303303
const escape_domaint &b,
304-
locationt from,
305-
locationt to)
304+
locationt,
305+
locationt)
306306
{
307307
bool changed=has_values.is_false();
308308
has_values=tvt::unknown();

src/analyses/escape_analysis.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class escape_analysist:public ait<escape_domaint>
112112
void instrument(goto_modelt &);
113113

114114
protected:
115-
virtual void initialize(const goto_functionst &_goto_functions)
115+
virtual void initialize(const goto_functionst &)
116116
{
117117
}
118118

src/analyses/flow_insensitive_analysis.cpp

+5-7
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ void flow_insensitive_analysis_baset::output(
7777
}
7878

7979
void flow_insensitive_analysis_baset::output(
80-
const goto_programt &goto_program,
81-
const irep_idt &identifier,
80+
const goto_programt &,
81+
const irep_idt &,
8282
std::ostream &out) const
8383
{
8484
get_state().output(ns, out);
@@ -199,7 +199,7 @@ bool flow_insensitive_analysis_baset::do_function_call(
199199
locationt l_call,
200200
const goto_functionst &goto_functions,
201201
const goto_functionst::function_mapt::const_iterator f_it,
202-
const exprt::operandst &arguments,
202+
const exprt::operandst &,
203203
statet &state)
204204
{
205205
const goto_functionst::goto_functiont &goto_function=f_it->second;
@@ -405,14 +405,12 @@ bool flow_insensitive_analysis_baset::fixedpoint(
405405
return fixedpoint(it->second.body, goto_functions);
406406
}
407407

408-
void flow_insensitive_analysis_baset::update(
409-
const goto_functionst &goto_functions)
408+
void flow_insensitive_analysis_baset::update(const goto_functionst &)
410409
{
411410
// no need to copy value sets around
412411
}
413412

414-
void flow_insensitive_analysis_baset::update(
415-
const goto_programt &goto_program)
413+
void flow_insensitive_analysis_baset::update(const goto_programt &)
416414
{
417415
// no need to copy value sets around
418416
}

src/analyses/flow_insensitive_analysis.h

+6-8
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ class flow_insensitive_abstract_domain_baset
4444
}
4545

4646
virtual void output(
47-
const namespacet &ns,
48-
std::ostream &out) const
47+
const namespacet &,
48+
std::ostream &) const
4949
{
5050
}
5151

5252
typedef std::unordered_set<exprt, irep_hash> expr_sett;
5353

5454
virtual void get_reference_set(
55-
const namespacet &ns,
56-
const exprt &expr,
55+
const namespacet &,
56+
const exprt &,
5757
expr_sett &expr_set)
5858
{
5959
// dummy, overload me!
@@ -95,17 +95,15 @@ class flow_insensitive_analysis_baset
9595
{
9696
}
9797

98-
virtual void initialize(
99-
const goto_programt &goto_program)
98+
virtual void initialize(const goto_programt &)
10099
{
101100
if(!initialized)
102101
{
103102
initialized=true;
104103
}
105104
}
106105

107-
virtual void initialize(
108-
const goto_functionst &goto_functions)
106+
virtual void initialize(const goto_functionst &)
109107
{
110108
if(!initialized)
111109
{

src/analyses/global_may_alias.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ void global_may_alias_domaint::get_rhs_aliases_address_of(
7777

7878
void global_may_alias_domaint::transform(
7979
locationt from,
80-
locationt to,
81-
ai_baset &ai,
82-
const namespacet &ns)
80+
locationt,
81+
ai_baset &,
82+
const namespacet &)
8383
{
8484
if(has_values.is_false())
8585
return;
@@ -120,8 +120,8 @@ void global_may_alias_domaint::transform(
120120

121121
void global_may_alias_domaint::output(
122122
std::ostream &out,
123-
const ai_baset &ai,
124-
const namespacet &ns) const
123+
const ai_baset &,
124+
const namespacet &) const
125125
{
126126
if(has_values.is_known())
127127
{
@@ -158,8 +158,8 @@ void global_may_alias_domaint::output(
158158

159159
bool global_may_alias_domaint::merge(
160160
const global_may_alias_domaint &b,
161-
locationt from,
162-
locationt to)
161+
locationt,
162+
locationt)
163163
{
164164
bool changed=has_values.is_false();
165165
has_values=tvt::unknown();

src/analyses/global_may_alias.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class global_may_alias_domaint:public ai_domain_baset
8787
class global_may_alias_analysist:public ait<global_may_alias_domaint>
8888
{
8989
protected:
90-
virtual void initialize(const goto_functionst &_goto_functions)
90+
virtual void initialize(const goto_functionst &)
9191
{
9292
}
9393
};

src/analyses/goto_rw.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ range_domain_baset::~range_domain_baset()
3434
{
3535
}
3636

37-
void range_domaint::output(
38-
const namespacet &ns, std::ostream &out) const
37+
void range_domaint::output(const namespacet &, std::ostream &out) const
3938
{
4039
out << "[";
4140
for(const_iterator itr=begin();
@@ -123,8 +122,8 @@ void rw_range_sett::get_objects_if(
123122
void rw_range_sett::get_objects_dereference(
124123
get_modet mode,
125124
const dereference_exprt &deref,
126-
const range_spect &range_start,
127-
const range_spect &size)
125+
const range_spect &,
126+
const range_spect &)
128127
{
129128
const exprt &pointer=deref.pointer();
130129
get_objects_rec(get_modet::READ, pointer);

src/analyses/goto_rw.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class rw_range_sett
141141
enum class get_modet { LHS_W, READ };
142142

143143
virtual void get_objects_rec(
144-
goto_programt::const_targett _target,
144+
goto_programt::const_targett,
145145
get_modet mode,
146146
const exprt &expr)
147147
{

src/analyses/interval_domain.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Author: Daniel Kroening, [email protected]
2222

2323
void interval_domaint::output(
2424
std::ostream &out,
25-
const ai_baset &ai,
26-
const namespacet &ns) const
25+
const ai_baset &,
26+
const namespacet &) const
2727
{
2828
if(bottom)
2929
{
@@ -59,7 +59,7 @@ void interval_domaint::output(
5959
void interval_domaint::transform(
6060
locationt from,
6161
locationt to,
62-
ai_baset &ai,
62+
ai_baset &,
6363
const namespacet &ns)
6464
{
6565
const goto_programt::instructiont &instruction=*from;

0 commit comments

Comments
 (0)