Skip to content

Remove names of unused parameters #2468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions jbmc/src/java_bytecode/java_bytecode_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,23 @@ std::set<std::string> java_bytecode_languaget::extensions() const
return { "class", "jar" };
}

void java_bytecode_languaget::modules_provided(std::set<std::string> &modules)
void java_bytecode_languaget::modules_provided(std::set<std::string> &)
{
// modules.insert(translation_unit(parse_path));
}

/// ANSI-C preprocessing
bool java_bytecode_languaget::preprocess(
std::istream &instream,
const std::string &path,
std::ostream &outstream)
std::istream &,
const std::string &,
std::ostream &)
{
// there is no preprocessing!
return true;
}

bool java_bytecode_languaget::parse(
std::istream &instream,
std::istream &,
const std::string &path)
{
PRECONDITION(language_options_initialized);
Expand Down Expand Up @@ -601,7 +601,7 @@ static void create_stub_global_symbols(

bool java_bytecode_languaget::typecheck(
symbol_tablet &symbol_table,
const std::string &module)
const std::string &)
{
PRECONDITION(language_options_initialized);

Expand Down Expand Up @@ -1089,7 +1089,7 @@ bool java_bytecode_languaget::convert_single_method(
return true;
}

bool java_bytecode_languaget::final(symbol_table_baset &symbol_table)
bool java_bytecode_languaget::final(symbol_table_baset &)
{
PRECONDITION(language_options_initialized);
return false;
Expand Down
2 changes: 1 addition & 1 deletion jbmc/src/java_bytecode/java_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ inline annotated_typet &to_annotated_type(typet &type)
}

template <>
inline bool can_cast_type<annotated_typet>(const typet &type)
inline bool can_cast_type<annotated_typet>(const typet &)
{
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion jbmc/src/java_bytecode/remove_exceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ void remove_exceptions(
remove_exceptions_typest type)
{
remove_exceptionst::function_may_throwt any_function_may_throw =
[](const irep_idt &id) { return true; };
[](const irep_idt &) { return true; };

remove_exceptionst remove_exceptions(
symbol_table,
Expand Down
2 changes: 1 addition & 1 deletion src/analyses/ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ bool ai_baset::do_function_call(
locationt l_call, locationt l_return,
const goto_functionst &goto_functions,
const goto_functionst::function_mapt::const_iterator f_it,
const exprt::operandst &arguments,
const exprt::operandst &,
const namespacet &ns)
{
// initialize state, if necessary
Expand Down
8 changes: 4 additions & 4 deletions src/analyses/ai.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,10 @@ class ait:public ai_baset

// not implemented in sequential analyses
bool merge_shared(
const statet &src,
goto_programt::const_targett from,
goto_programt::const_targett to,
const namespacet &ns) override
const statet &,
goto_programt::const_targett,
goto_programt::const_targett,
const namespacet &) override
{
throw "not implemented";
}
Expand Down
8 changes: 4 additions & 4 deletions src/analyses/constant_propagator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void constant_propagator_domaint::transform(
/// handles equalities and conjunctions containing equalities
bool constant_propagator_domaint::two_way_propagate_rec(
const exprt &expr,
const namespacet &ns,
const namespacet &,
const constant_propagator_ait *cp)
{
#ifdef DEBUG
Expand Down Expand Up @@ -391,7 +391,7 @@ void constant_propagator_domaint::valuest::output(

void constant_propagator_domaint::output(
std::ostream &out,
const ai_baset &ai,
const ai_baset &,
const namespacet &ns) const
{
values.output(out, ns);
Expand Down Expand Up @@ -503,8 +503,8 @@ bool constant_propagator_domaint::valuest::meet(const valuest &src)
/// \return Return true if "this" has changed.
bool constant_propagator_domaint::merge(
const constant_propagator_domaint &other,
locationt from,
locationt to)
locationt,
locationt)
{
return values.merge(other.values);
}
Expand Down
6 changes: 3 additions & 3 deletions src/analyses/custom_bitvector_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ void custom_bitvector_domaint::transform(
void custom_bitvector_domaint::output(
std::ostream &out,
const ai_baset &ai,
const namespacet &ns) const
const namespacet &) const
{
if(has_values.is_known())
{
Expand Down Expand Up @@ -591,8 +591,8 @@ void custom_bitvector_domaint::output(

bool custom_bitvector_domaint::merge(
const custom_bitvector_domaint &b,
locationt from,
locationt to)
locationt,
locationt)
{
bool changed=has_values.is_false();
has_values=tvt::unknown();
Expand Down
14 changes: 7 additions & 7 deletions src/analyses/dependence_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Date: August 2013

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

void dep_graph_domaint::data_dependencies(
goto_programt::const_targett from,
goto_programt::const_targett,
goto_programt::const_targett to,
dependence_grapht &dep_graph,
const namespacet &ns)
Expand Down Expand Up @@ -237,8 +237,8 @@ void dep_graph_domaint::transform(

void dep_graph_domaint::output(
std::ostream &out,
const ai_baset &ai,
const namespacet &ns) const
const ai_baset &,
const namespacet &) const
{
if(!control_deps.empty())
{
Expand Down Expand Up @@ -275,8 +275,8 @@ void dep_graph_domaint::output(
/// \par parameters: The abstract interpreter and the namespace.
/// \return The domain, formatted as a JSON object.
jsont dep_graph_domaint::output_json(
const ai_baset &ai,
const namespacet &ns) const
const ai_baset &,
const namespacet &) const
{
json_arrayt graph;

Expand Down
14 changes: 7 additions & 7 deletions src/analyses/escape_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ void escape_domaint::get_rhs_aliases_address_of(

void escape_domaint::transform(
locationt from,
locationt to,
ai_baset &ai,
const namespacet &ns)
locationt,
ai_baset &,
const namespacet &)
{
if(has_values.is_false())
return;
Expand Down Expand Up @@ -255,8 +255,8 @@ void escape_domaint::transform(

void escape_domaint::output(
std::ostream &out,
const ai_baset &ai,
const namespacet &ns) const
const ai_baset &,
const namespacet &) const
{
if(has_values.is_known())
{
Expand Down Expand Up @@ -301,8 +301,8 @@ void escape_domaint::output(

bool escape_domaint::merge(
const escape_domaint &b,
locationt from,
locationt to)
locationt,
locationt)
{
bool changed=has_values.is_false();
has_values=tvt::unknown();
Expand Down
2 changes: 1 addition & 1 deletion src/analyses/escape_analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class escape_analysist:public ait<escape_domaint>
void instrument(goto_modelt &);

protected:
virtual void initialize(const goto_functionst &_goto_functions)
virtual void initialize(const goto_functionst &)
{
}

Expand Down
12 changes: 5 additions & 7 deletions src/analyses/flow_insensitive_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ void flow_insensitive_analysis_baset::output(
}

void flow_insensitive_analysis_baset::output(
const goto_programt &goto_program,
const irep_idt &identifier,
const goto_programt &,
const irep_idt &,
std::ostream &out) const
{
get_state().output(ns, out);
Expand Down Expand Up @@ -199,7 +199,7 @@ bool flow_insensitive_analysis_baset::do_function_call(
locationt l_call,
const goto_functionst &goto_functions,
const goto_functionst::function_mapt::const_iterator f_it,
const exprt::operandst &arguments,
const exprt::operandst &,
statet &state)
{
const goto_functionst::goto_functiont &goto_function=f_it->second;
Expand Down Expand Up @@ -405,14 +405,12 @@ bool flow_insensitive_analysis_baset::fixedpoint(
return fixedpoint(it->second.body, goto_functions);
}

void flow_insensitive_analysis_baset::update(
const goto_functionst &goto_functions)
void flow_insensitive_analysis_baset::update(const goto_functionst &)
{
// no need to copy value sets around
}

void flow_insensitive_analysis_baset::update(
const goto_programt &goto_program)
void flow_insensitive_analysis_baset::update(const goto_programt &)
{
// no need to copy value sets around
}
14 changes: 6 additions & 8 deletions src/analyses/flow_insensitive_analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ class flow_insensitive_abstract_domain_baset
}

virtual void output(
const namespacet &ns,
std::ostream &out) const
const namespacet &,
std::ostream &) const
{
}

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

virtual void get_reference_set(
const namespacet &ns,
const exprt &expr,
const namespacet &,
const exprt &,
expr_sett &expr_set)
{
// dummy, overload me!
Expand Down Expand Up @@ -95,17 +95,15 @@ class flow_insensitive_analysis_baset
{
}

virtual void initialize(
const goto_programt &goto_program)
virtual void initialize(const goto_programt &)
{
if(!initialized)
{
initialized=true;
}
}

virtual void initialize(
const goto_functionst &goto_functions)
virtual void initialize(const goto_functionst &)
{
if(!initialized)
{
Expand Down
14 changes: 7 additions & 7 deletions src/analyses/global_may_alias.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ void global_may_alias_domaint::get_rhs_aliases_address_of(

void global_may_alias_domaint::transform(
locationt from,
locationt to,
ai_baset &ai,
const namespacet &ns)
locationt,
ai_baset &,
const namespacet &)
{
if(has_values.is_false())
return;
Expand Down Expand Up @@ -120,8 +120,8 @@ void global_may_alias_domaint::transform(

void global_may_alias_domaint::output(
std::ostream &out,
const ai_baset &ai,
const namespacet &ns) const
const ai_baset &,
const namespacet &) const
{
if(has_values.is_known())
{
Expand Down Expand Up @@ -158,8 +158,8 @@ void global_may_alias_domaint::output(

bool global_may_alias_domaint::merge(
const global_may_alias_domaint &b,
locationt from,
locationt to)
locationt,
locationt)
{
bool changed=has_values.is_false();
has_values=tvt::unknown();
Expand Down
2 changes: 1 addition & 1 deletion src/analyses/global_may_alias.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class global_may_alias_domaint:public ai_domain_baset
class global_may_alias_analysist:public ait<global_may_alias_domaint>
{
protected:
virtual void initialize(const goto_functionst &_goto_functions)
virtual void initialize(const goto_functionst &)
{
}
};
Expand Down
7 changes: 3 additions & 4 deletions src/analyses/goto_rw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ range_domain_baset::~range_domain_baset()
{
}

void range_domaint::output(
const namespacet &ns, std::ostream &out) const
void range_domaint::output(const namespacet &, std::ostream &out) const
{
out << "[";
for(const_iterator itr=begin();
Expand Down Expand Up @@ -123,8 +122,8 @@ void rw_range_sett::get_objects_if(
void rw_range_sett::get_objects_dereference(
get_modet mode,
const dereference_exprt &deref,
const range_spect &range_start,
const range_spect &size)
const range_spect &,
const range_spect &)
{
const exprt &pointer=deref.pointer();
get_objects_rec(get_modet::READ, pointer);
Expand Down
2 changes: 1 addition & 1 deletion src/analyses/goto_rw.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class rw_range_sett
enum class get_modet { LHS_W, READ };

virtual void get_objects_rec(
goto_programt::const_targett _target,
goto_programt::const_targett,
get_modet mode,
const exprt &expr)
{
Expand Down
6 changes: 3 additions & 3 deletions src/analyses/interval_domain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Author: Daniel Kroening, [email protected]

void interval_domaint::output(
std::ostream &out,
const ai_baset &ai,
const namespacet &ns) const
const ai_baset &,
const namespacet &) const
{
if(bottom)
{
Expand Down Expand Up @@ -59,7 +59,7 @@ void interval_domaint::output(
void interval_domaint::transform(
locationt from,
locationt to,
ai_baset &ai,
ai_baset &,
const namespacet &ns)
{
const goto_programt::instructiont &instruction=*from;
Expand Down
Loading