From c290f6e5704d8d1e227fc32720676a2613d5d51c Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 24 Jan 2019 23:28:11 +0100 Subject: [PATCH 1/1] [sonar] Anonymize unused parameters. --- examples/smpi/replay/replay.cpp | 2 +- src/instr/instr_platform.cpp | 2 +- src/kernel/context/Context.cpp | 4 +- src/mc/mc_unw.cpp | 34 +++++---------- src/mc/remote/Client.cpp | 6 +-- src/mc/remote/Client.hpp | 2 +- src/mc/remote/RemoteClient.cpp | 2 +- src/s4u/s4u_Exec.cpp | 2 +- src/s4u/s4u_Io.cpp | 2 +- src/smpi/internals/smpi_deployment.cpp | 6 +-- src/smpi/internals/smpi_replay.cpp | 58 ++++++++++++------------- src/smpi/mpi/smpi_op.cpp | 2 +- src/smpi/mpi/smpi_request.cpp | 4 +- src/smpi/plugins/sampi_loadbalancer.cpp | 4 +- src/surf/cpu_cas01.cpp | 2 +- src/surf/cpu_interface.cpp | 2 +- src/surf/cpu_ti.hpp | 2 +- src/surf/network_constant.cpp | 5 +-- src/surf/ptask_L07.hpp | 2 +- 19 files changed, 65 insertions(+), 78 deletions(-) diff --git a/examples/smpi/replay/replay.cpp b/examples/smpi/replay/replay.cpp index 2364b74321..d1107d24b2 100644 --- a/examples/smpi/replay/replay.cpp +++ b/examples/smpi/replay/replay.cpp @@ -14,7 +14,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example") /* This shows how to extend the trace format by adding a new kind of events. This function is registered through xbt_replay_action_register() below. */ -static void action_blah(simgrid::xbt::ReplayAction& args) +static void action_blah(simgrid::xbt::ReplayAction& /*args*/) { /* Add your answer to the blah event here. args is a strings array containing the blank-separated parameters found in the trace for this event instance. */ diff --git a/src/instr/instr_platform.cpp b/src/instr/instr_platform.cpp index 4def7efe76..f0433c4d37 100644 --- a/src/instr/instr_platform.cpp +++ b/src/instr/instr_platform.cpp @@ -306,7 +306,7 @@ static void instr_actor_on_creation(simgrid::s4u::ActorPtr actor) std::string container_name = instr_pid(actor.get()); actor->on_exit( - [container_name](int status, void* actor) { + [container_name](int status, void*) { if (status == SMX_EXIT_FAILURE) // kill means that this actor no longer exists, let's destroy it simgrid::instr::Container::by_name(container_name)->remove_from_parent(); diff --git a/src/kernel/context/Context.cpp b/src/kernel/context/Context.cpp index 359ddf6357..7b828c1b1b 100644 --- a/src/kernel/context/Context.cpp +++ b/src/kernel/context/Context.cpp @@ -54,13 +54,13 @@ void Context::declare_context(std::size_t size) #endif } -Context* ContextFactory::attach(void_pfn_smxprocess_t cleanup_func, smx_actor_t process) +Context* ContextFactory::attach(void_pfn_smxprocess_t, smx_actor_t) { xbt_die("Cannot attach with this ContextFactory.\n" "Try using --cfg=contexts/factory:thread instead.\n"); } -Context* ContextFactory::create_maestro(std::function code, smx_actor_t process) +Context* ContextFactory::create_maestro(std::function, smx_actor_t) { xbt_die("Cannot create_maestro with this ContextFactory.\n" "Try using --cfg=contexts/factory:thread instead.\n"); diff --git a/src/mc/mc_unw.cpp b/src/mc/mc_unw.cpp index 9535cac5c6..78299e3a65 100644 --- a/src/mc/mc_unw.cpp +++ b/src/mc/mc_unw.cpp @@ -37,9 +37,8 @@ namespace mc { * * Delegates to the local/ptrace implementation. */ -int UnwindContext::find_proc_info(unw_addr_space_t as, - unw_word_t ip, unw_proc_info_t *pip, - int need_unwind_info, void* arg) noexcept +int UnwindContext::find_proc_info(unw_addr_space_t /*as*/, unw_word_t ip, unw_proc_info_t* pip, int need_unwind_info, + void* arg) noexcept { simgrid::mc::UnwindContext* context = (simgrid::mc::UnwindContext*) arg; return unw_get_accessors(context->process_->unw_underlying_addr_space)->find_proc_info( @@ -52,8 +51,7 @@ int UnwindContext::find_proc_info(unw_addr_space_t as, * * Delegates to the local/ptrace implementation. */ -void UnwindContext::put_unwind_info(unw_addr_space_t as, - unw_proc_info_t *pip, void* arg) noexcept +void UnwindContext::put_unwind_info(unw_addr_space_t /*as*/, unw_proc_info_t* pip, void* arg) noexcept { simgrid::mc::UnwindContext* context = (simgrid::mc::UnwindContext*) arg; return unw_get_accessors(context->process_->unw_underlying_addr_space)->put_unwind_info( @@ -66,8 +64,7 @@ void UnwindContext::put_unwind_info(unw_addr_space_t as, * * Not implemented. */ -int UnwindContext::get_dyn_info_list_addr(unw_addr_space_t as, - unw_word_t *dilap, void* arg) noexcept +int UnwindContext::get_dyn_info_list_addr(unw_addr_space_t /*as*/, unw_word_t* dilap, void* arg) noexcept { simgrid::mc::UnwindContext* context = (simgrid::mc::UnwindContext*) arg; return unw_get_accessors(context->process_->unw_underlying_addr_space)->get_dyn_info_list_addr( @@ -81,9 +78,7 @@ int UnwindContext::get_dyn_info_list_addr(unw_addr_space_t as, * * Delegates to the `simgrid::mc::Process*`. */ -int UnwindContext::access_mem(unw_addr_space_t as, - unw_word_t addr, unw_word_t *valp, - int write, void* arg) noexcept +int UnwindContext::access_mem(unw_addr_space_t /*as*/, unw_word_t addr, unw_word_t* valp, int write, void* arg) noexcept { simgrid::mc::UnwindContext* context = (simgrid::mc::UnwindContext*) arg; if (write) @@ -145,9 +140,8 @@ void* UnwindContext::get_reg(unw_context_t* context, unw_regnum_t regnum) noexce /** Read a standard register (libunwind method) */ -int UnwindContext::access_reg(unw_addr_space_t as, - unw_regnum_t regnum, unw_word_t *valp, - int write, void* arg) noexcept +int UnwindContext::access_reg(unw_addr_space_t /*as*/, unw_regnum_t regnum, unw_word_t* valp, int write, + void* arg) noexcept { simgrid::mc::UnwindContext* as_context = (simgrid::mc::UnwindContext*) arg; unw_context_t* context = &as_context->unwindContext_; @@ -166,9 +160,8 @@ int UnwindContext::access_reg(unw_addr_space_t as, * `getcontext()` is not relevant for the caller. It is not really necessary * to save and handle them. */ -int UnwindContext::access_fpreg(unw_addr_space_t as, - unw_regnum_t regnum, unw_fpreg_t *fpvalp, - int write, void* arg) noexcept +int UnwindContext::access_fpreg(unw_addr_space_t /*as*/, unw_regnum_t /*regnum*/, unw_fpreg_t* /*fpvalp*/, + int /*write*/, void* /*arg*/) noexcept { return -UNW_EBADREG; } @@ -177,18 +170,15 @@ int UnwindContext::access_fpreg(unw_addr_space_t as, * * We don't use this. */ -int UnwindContext::resume(unw_addr_space_t as, - unw_cursor_t *cp, void* arg) noexcept +int UnwindContext::resume(unw_addr_space_t /*as*/, unw_cursor_t* /*cp*/, void* /*arg*/) noexcept { return -UNW_EUNSPEC; } /** Find informations about a function (libunwind method) */ -int UnwindContext::get_proc_name(unw_addr_space_t as, - unw_word_t addr, char *bufp, - size_t buf_len, unw_word_t *offp, - void* arg) noexcept +int UnwindContext::get_proc_name(unw_addr_space_t /*as*/, unw_word_t addr, char* bufp, size_t buf_len, unw_word_t* offp, + void* arg) noexcept { simgrid::mc::UnwindContext* context = (simgrid::mc::UnwindContext*) arg; simgrid::mc::Frame* frame = context->process_->find_function(remote(addr)); diff --git a/src/mc/remote/Client.cpp b/src/mc/remote/Client.cpp index 7db16462b7..ada56e0be0 100644 --- a/src/mc/remote/Client.cpp +++ b/src/mc/remote/Client.cpp @@ -83,7 +83,7 @@ Client* Client::initialize() return instance_.get(); } -void Client::handleDeadlockCheck(s_mc_message_t* msg) +void Client::handleDeadlockCheck(s_mc_message_t*) { bool deadlock = false; if (not simix_global->process_list.empty()) { @@ -99,7 +99,7 @@ void Client::handleDeadlockCheck(s_mc_message_t* msg) s_mc_message_int_t answer{MC_MESSAGE_DEADLOCK_CHECK_REPLY, deadlock}; xbt_assert(channel_.send(answer) == 0, "Could not send response"); } -void Client::handleContinue(s_mc_message_t* msg) +void Client::handleContinue(s_mc_message_t*) { /* Nothing to do */ } @@ -187,7 +187,7 @@ void Client::mainLoop() } } -void Client::reportAssertionFailure(const char* description) +void Client::reportAssertionFailure() { if (channel_.send(MC_MESSAGE_ASSERTION_FAILED)) xbt_die("Could not send assertion to model-checker"); diff --git a/src/mc/remote/Client.hpp b/src/mc/remote/Client.hpp index dea40c6e00..d28987dc0e 100644 --- a/src/mc/remote/Client.hpp +++ b/src/mc/remote/Client.hpp @@ -38,7 +38,7 @@ public: Channel const& getChannel() const { return channel_; } Channel& getChannel() { return channel_; } void mainLoop(); - void reportAssertionFailure(const char* description = nullptr); + void reportAssertionFailure(); void ignoreMemory(void* addr, std::size_t size); void ignoreHeap(void* addr, std::size_t size); void unignoreHeap(void* addr, std::size_t size); diff --git a/src/mc/remote/RemoteClient.cpp b/src/mc/remote/RemoteClient.cpp index e8000dad03..faefc3c8fb 100644 --- a/src/mc/remote/RemoteClient.cpp +++ b/src/mc/remote/RemoteClient.cpp @@ -455,7 +455,7 @@ std::string RemoteClient::read_string(RemotePtr address) const } const void* RemoteClient::read_bytes(void* buffer, std::size_t size, RemotePtr address, int process_index, - ReadOptions options) const + ReadOptions /*options*/) const { #if HAVE_SMPI if (process_index != simgrid::mc::ProcessIndexDisabled) { diff --git a/src/s4u/s4u_Exec.cpp b/src/s4u/s4u_Exec.cpp index 83e67849ec..60ba49aced 100644 --- a/src/s4u/s4u_Exec.cpp +++ b/src/s4u/s4u_Exec.cpp @@ -40,7 +40,7 @@ Exec* Exec::wait() return this; } -Exec* Exec::wait_for(double timeout) +Exec* Exec::wait_for(double) { THROW_UNIMPLEMENTED; return this; diff --git a/src/s4u/s4u_Io.cpp b/src/s4u/s4u_Io.cpp index 5c4641478b..0e7f6ee845 100644 --- a/src/s4u/s4u_Io.cpp +++ b/src/s4u/s4u_Io.cpp @@ -38,7 +38,7 @@ Io* Io::wait() return this; } -Io* Io::wait_for(double timeout) +Io* Io::wait_for(double) { THROW_UNIMPLEMENTED; return this; diff --git a/src/smpi/internals/smpi_deployment.cpp b/src/smpi/internals/smpi_deployment.cpp index ff21285921..441d608072 100644 --- a/src/smpi/internals/smpi_deployment.cpp +++ b/src/smpi/internals/smpi_deployment.cpp @@ -16,8 +16,7 @@ namespace app { class Instance { public: - Instance(const std::string name, int max_no_processes, int process_count, MPI_Comm comm, - simgrid::s4u::Barrier* finalization_barrier) + Instance(const std::string name, int max_no_processes, MPI_Comm comm, simgrid::s4u::Barrier* finalization_barrier) : name(name) , size(max_no_processes) , present_processes(0) @@ -65,8 +64,7 @@ void SMPI_app_instance_register(const char *name, xbt_main_func_t code, int num_ } } - Instance instance(std::string(name), num_processes, process_count, MPI_COMM_NULL, - new simgrid::s4u::Barrier(num_processes)); + Instance instance(std::string(name), num_processes, MPI_COMM_NULL, new simgrid::s4u::Barrier(num_processes)); MPI_Group group = new simgrid::smpi::Group(instance.size); instance.comm_world = new simgrid::smpi::Comm(group, nullptr); // FIXME : using MPI_Attr_put with MPI_UNIVERSE_SIZE is forbidden and we make it a no-op (which triggers a warning as MPI_ERR_ARG is returned). diff --git a/src/smpi/internals/smpi_replay.cpp b/src/smpi/internals/smpi_replay.cpp index 673255ffd8..2172bf4d64 100644 --- a/src/smpi/internals/smpi_replay.cpp +++ b/src/smpi/internals/smpi_replay.cpp @@ -141,7 +141,7 @@ public: } }; -void WaitTestParser::parse(simgrid::xbt::ReplayAction& action, std::string name) +void WaitTestParser::parse(simgrid::xbt::ReplayAction& action, std::string) { CHECK_ACTION_PARAMS(action, 3, 0) src = std::stoi(action[2]); @@ -149,7 +149,7 @@ void WaitTestParser::parse(simgrid::xbt::ReplayAction& action, std::string name) tag = std::stoi(action[4]); } -void SendRecvParser::parse(simgrid::xbt::ReplayAction& action, std::string name) +void SendRecvParser::parse(simgrid::xbt::ReplayAction& action, std::string) { CHECK_ACTION_PARAMS(action, 3, 1) partner = std::stoi(action[2]); @@ -159,13 +159,13 @@ void SendRecvParser::parse(simgrid::xbt::ReplayAction& action, std::string name) datatype1 = simgrid::smpi::Datatype::decode(action[5]); } -void ComputeParser::parse(simgrid::xbt::ReplayAction& action, std::string name) +void ComputeParser::parse(simgrid::xbt::ReplayAction& action, std::string) { CHECK_ACTION_PARAMS(action, 1, 0) flops = parse_double(action[2]); } -void BcastArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name) +void BcastArgParser::parse(simgrid::xbt::ReplayAction& action, std::string) { CHECK_ACTION_PARAMS(action, 1, 2) size = parse_double(action[2]); @@ -174,7 +174,7 @@ void BcastArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name) datatype1 = simgrid::smpi::Datatype::decode(action[4]); } -void ReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name) +void ReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string) { CHECK_ACTION_PARAMS(action, 2, 2) comm_size = parse_double(action[2]); @@ -184,7 +184,7 @@ void ReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name datatype1 = simgrid::smpi::Datatype::decode(action[5]); } -void AllReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name) +void AllReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string) { CHECK_ACTION_PARAMS(action, 2, 1) comm_size = parse_double(action[2]); @@ -193,7 +193,7 @@ void AllReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string n datatype1 = simgrid::smpi::Datatype::decode(action[4]); } -void AllToAllArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name) +void AllToAllArgParser::parse(simgrid::xbt::ReplayAction& action, std::string) { CHECK_ACTION_PARAMS(action, 2, 1) comm_size = MPI_COMM_WORLD->size(); @@ -291,7 +291,7 @@ void GatherVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string nam recv_size_sum = std::accumulate(recvcounts->begin(), recvcounts->end(), 0); } -void ScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name) +void ScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::string) { /* The structure of the scatter action for the rank 0 (total 4 processes) is the following: 0 gather 68 68 0 0 0 @@ -313,7 +313,7 @@ void ScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::string nam datatype2 = simgrid::smpi::Datatype::decode(action[6]); } -void ScatterVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name) +void ScatterVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string) { /* The structure of the scatterv action for the rank 0 (total 4 processes) is the following: 0 gather 68 10 10 10 68 0 0 0 @@ -341,7 +341,7 @@ void ScatterVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string na root = (action.size() > 3 + comm_size) ? std::stoi(action[3 + comm_size]) : 0; } -void ReduceScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name) +void ReduceScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::string) { /* The structure of the reducescatter action for the rank 0 (total 4 processes) is the following: 0 reducescatter 275427 275427 275427 204020 11346849 0 @@ -363,7 +363,7 @@ void ReduceScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::stri recv_size_sum = std::accumulate(recvcounts->begin(), recvcounts->end(), 0); } -void AllToAllVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name) +void AllToAllVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string) { /* The structure of the alltoallv action for the rank 0 (total 4 processes) is the following: 0 alltoallv 100 1 7 10 12 100 1 70 10 5 @@ -424,7 +424,7 @@ void WaitAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_recv(args.src, args.dst, args.tag); } -void SendAction::kernel(simgrid::xbt::ReplayAction& action) +void SendAction::kernel(simgrid::xbt::ReplayAction&) { int dst_traced = MPI_COMM_WORLD->group()->actor(args.partner)->get_pid(); @@ -445,7 +445,7 @@ void SendAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_comm_out(my_proc_id); } -void RecvAction::kernel(simgrid::xbt::ReplayAction& action) +void RecvAction::kernel(simgrid::xbt::ReplayAction&) { TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size, args.tag, Datatype::encode(args.datatype1))); @@ -473,14 +473,14 @@ void RecvAction::kernel(simgrid::xbt::ReplayAction& action) } } -void ComputeAction::kernel(simgrid::xbt::ReplayAction& action) +void ComputeAction::kernel(simgrid::xbt::ReplayAction&) { TRACE_smpi_computing_in(my_proc_id, args.flops); smpi_execute_flops(args.flops); TRACE_smpi_computing_out(my_proc_id); } -void TestAction::kernel(simgrid::xbt::ReplayAction& action) +void TestAction::kernel(simgrid::xbt::ReplayAction&) { MPI_Request request = req_storage.find(args.src, args.dst, args.tag); req_storage.remove(request); @@ -515,12 +515,12 @@ void InitAction::kernel(simgrid::xbt::ReplayAction& action) smpi_process()->simulated_start(); } -void CommunicatorAction::kernel(simgrid::xbt::ReplayAction& action) +void CommunicatorAction::kernel(simgrid::xbt::ReplayAction&) { /* nothing to do */ } -void WaitAllAction::kernel(simgrid::xbt::ReplayAction& action) +void WaitAllAction::kernel(simgrid::xbt::ReplayAction&) { const unsigned int count_requests = req_storage.size(); @@ -545,14 +545,14 @@ void WaitAllAction::kernel(simgrid::xbt::ReplayAction& action) } } -void BarrierAction::kernel(simgrid::xbt::ReplayAction& action) +void BarrierAction::kernel(simgrid::xbt::ReplayAction&) { TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("barrier")); Colls::barrier(MPI_COMM_WORLD); TRACE_smpi_comm_out(my_proc_id); } -void BcastAction::kernel(simgrid::xbt::ReplayAction& action) +void BcastAction::kernel(simgrid::xbt::ReplayAction&) { TRACE_smpi_comm_in(my_proc_id, "action_bcast", new simgrid::instr::CollTIData("bcast", MPI_COMM_WORLD->group()->actor(args.root)->get_pid(), @@ -563,7 +563,7 @@ void BcastAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_comm_out(my_proc_id); } -void ReduceAction::kernel(simgrid::xbt::ReplayAction& action) +void ReduceAction::kernel(simgrid::xbt::ReplayAction&) { TRACE_smpi_comm_in(my_proc_id, "action_reduce", new simgrid::instr::CollTIData("reduce", MPI_COMM_WORLD->group()->actor(args.root)->get_pid(), @@ -577,7 +577,7 @@ void ReduceAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_comm_out(my_proc_id); } -void AllReduceAction::kernel(simgrid::xbt::ReplayAction& action) +void AllReduceAction::kernel(simgrid::xbt::ReplayAction&) { TRACE_smpi_comm_in(my_proc_id, "action_allreduce", new simgrid::instr::CollTIData("allreduce", -1, args.comp_size, args.comm_size, -1, Datatype::encode(args.datatype1), "")); @@ -589,7 +589,7 @@ void AllReduceAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_comm_out(my_proc_id); } -void AllToAllAction::kernel(simgrid::xbt::ReplayAction& action) +void AllToAllAction::kernel(simgrid::xbt::ReplayAction&) { TRACE_smpi_comm_in(my_proc_id, "action_alltoall", new simgrid::instr::CollTIData("alltoall", -1, -1.0, args.send_size, args.recv_size, @@ -603,7 +603,7 @@ void AllToAllAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_comm_out(my_proc_id); } -void GatherAction::kernel(simgrid::xbt::ReplayAction& action) +void GatherAction::kernel(simgrid::xbt::ReplayAction&) { TRACE_smpi_comm_in(my_proc_id, name.c_str(), new simgrid::instr::CollTIData(name, (name == "gather") ? args.root : -1, -1.0, args.send_size, args.recv_size, Datatype::encode(args.datatype1), Datatype::encode(args.datatype2))); @@ -620,7 +620,7 @@ void GatherAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_comm_out(my_proc_id); } -void GatherVAction::kernel(simgrid::xbt::ReplayAction& action) +void GatherVAction::kernel(simgrid::xbt::ReplayAction&) { int rank = MPI_COMM_WORLD->rank(); @@ -642,7 +642,7 @@ void GatherVAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_comm_out(my_proc_id); } -void ScatterAction::kernel(simgrid::xbt::ReplayAction& action) +void ScatterAction::kernel(simgrid::xbt::ReplayAction&) { int rank = MPI_COMM_WORLD->rank(); TRACE_smpi_comm_in(my_proc_id, "action_scatter", new simgrid::instr::CollTIData(name, args.root, -1.0, args.send_size, args.recv_size, @@ -655,7 +655,7 @@ void ScatterAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_comm_out(my_proc_id); } -void ScatterVAction::kernel(simgrid::xbt::ReplayAction& action) +void ScatterVAction::kernel(simgrid::xbt::ReplayAction&) { int rank = MPI_COMM_WORLD->rank(); TRACE_smpi_comm_in(my_proc_id, "action_scatterv", new simgrid::instr::VarCollTIData(name, args.root, -1, args.sendcounts, args.recv_size, @@ -670,7 +670,7 @@ void ScatterVAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_comm_out(my_proc_id); } -void ReduceScatterAction::kernel(simgrid::xbt::ReplayAction& action) +void ReduceScatterAction::kernel(simgrid::xbt::ReplayAction&) { TRACE_smpi_comm_in(my_proc_id, "action_reducescatter", new simgrid::instr::VarCollTIData("reducescatter", -1, 0, nullptr, -1, args.recvcounts, @@ -685,7 +685,7 @@ void ReduceScatterAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_comm_out(my_proc_id); } -void AllToAllVAction::kernel(simgrid::xbt::ReplayAction& action) +void AllToAllVAction::kernel(simgrid::xbt::ReplayAction&) { TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::VarCollTIData( @@ -719,7 +719,7 @@ void smpi_replay_init(const char* instance_id, int rank, double start_delay_flop TRACE_smpi_comm_in(my_proc_id, "smpi_replay_run_init", new simgrid::instr::NoOpTIData("init")); TRACE_smpi_comm_out(my_proc_id); xbt_replay_action_register("init", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::InitAction().execute(action); }); - xbt_replay_action_register("finalize", [](simgrid::xbt::ReplayAction& action) { /* nothing to do */ }); + xbt_replay_action_register("finalize", [](simgrid::xbt::ReplayAction&) { /* nothing to do */ }); xbt_replay_action_register("comm_size", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); }); xbt_replay_action_register("comm_split",[](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); }); xbt_replay_action_register("comm_dup", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); }); diff --git a/src/smpi/mpi/smpi_op.cpp b/src/smpi/mpi/smpi_op.cpp index 9c02566039..edd56514b0 100644 --- a/src/smpi/mpi/smpi_op.cpp +++ b/src/smpi/mpi/smpi_op.cpp @@ -190,7 +190,7 @@ static void replace_func(void *a, void *b, int *length, MPI_Datatype * datatype) memcpy(b, a, *length * (*datatype)->size()); } -static void no_func(void *a, void *b, int *length, MPI_Datatype * datatype) +static void no_func(void*, void*, int*, MPI_Datatype*) { /* obviously a no-op */ } diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 227857cd19..242c12f4fb 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -134,7 +134,7 @@ void Request::unref(MPI_Request* request) } } -int Request::match_recv(void* a, void* b, simgrid::kernel::activity::CommImpl* ignored) +int Request::match_recv(void* a, void* b, simgrid::kernel::activity::CommImpl*) { MPI_Request ref = static_cast(a); MPI_Request req = static_cast(b); @@ -160,7 +160,7 @@ int Request::match_recv(void* a, void* b, simgrid::kernel::activity::CommImpl* i }else return 0; } -int Request::match_send(void* a, void* b, simgrid::kernel::activity::CommImpl* ignored) +int Request::match_send(void* a, void* b, simgrid::kernel::activity::CommImpl*) { MPI_Request ref = static_cast(a); MPI_Request req = static_cast(b); diff --git a/src/smpi/plugins/sampi_loadbalancer.cpp b/src/smpi/plugins/sampi_loadbalancer.cpp index 1085a8f21f..5f84008ff7 100644 --- a/src/smpi/plugins/sampi_loadbalancer.cpp +++ b/src/smpi/plugins/sampi_loadbalancer.cpp @@ -32,7 +32,7 @@ static simgrid::plugin::loadbalancer::LoadBalancer lb; class MigrateParser : public simgrid::smpi::replay::ActionArgParser { public: double memory_consumption; - void parse(simgrid::xbt::ReplayAction& action, std::string name) + void parse(simgrid::xbt::ReplayAction& action, std::string) { // The only parameter is the amount of memory used by the current process. CHECK_ACTION_PARAMS(action, 1, 0); @@ -47,7 +47,7 @@ public: class MigrateAction : public simgrid::smpi::replay::ReplayAction { public: explicit MigrateAction() : ReplayAction("Migrate") {} - void kernel(simgrid::xbt::ReplayAction& action) + void kernel(simgrid::xbt::ReplayAction&) { static std::map migration_call_counter; static simgrid::s4u::Barrier smpilb_bar(smpi_process_count()); diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index 899546c65b..c3ca28c4cd 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -25,7 +25,7 @@ static simgrid::config::Flag {"Full", "Full update of remaining and variables. Slow but may be useful when debugging."}, }), - [](std::string const& val) { + [](std::string const&) { xbt_assert(_sg_cfg_init_status < 2, "Cannot change the optimization algorithm after the initialization"); }); diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 01e7347657..5cf965e155 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -32,7 +32,7 @@ void CpuModel::update_actions_state_lazy(double now, double /*delta*/) } } -void CpuModel::update_actions_state_full(double now, double delta) +void CpuModel::update_actions_state_full(double /*now*/, double delta) { for (auto it = std::begin(*get_started_action_set()); it != std::end(*get_started_action_set());) { CpuAction& action = static_cast(*it); diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index 14455c1555..fcbdbddea6 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -111,7 +111,7 @@ public: bool is_used() override; CpuAction *execution_start(double size) override; - kernel::resource::Action* execution_start(double size, int requested_cores) override + kernel::resource::Action* execution_start(double, int) override { THROW_UNIMPLEMENTED; return nullptr; diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index 9a9adb77e8..41a3385f4d 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -26,8 +26,7 @@ NetworkConstantModel::NetworkConstantModel() : NetworkModel(Model::UpdateAlgo::F all_existing_models.push_back(this); } -LinkImpl* NetworkConstantModel::create_link(const std::string& name, double bw, double lat, - s4u::Link::SharingPolicy policy) +LinkImpl* NetworkConstantModel::create_link(const std::string& name, double, double, s4u::Link::SharingPolicy) { xbt_die("Refusing to create the link %s: there is no link in the Constant network model. " @@ -70,7 +69,7 @@ void NetworkConstantModel::update_actions_state(double /*now*/, double delta) } } -kernel::resource::Action* NetworkConstantModel::communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) +kernel::resource::Action* NetworkConstantModel::communicate(s4u::Host* src, s4u::Host* dst, double size, double) { NetworkConstantAction* action = new NetworkConstantAction(this, size, sg_latency_factor); diff --git a/src/surf/ptask_L07.hpp b/src/surf/ptask_L07.hpp index 8cb8d64c1a..6f42adfc4e 100644 --- a/src/surf/ptask_L07.hpp +++ b/src/surf/ptask_L07.hpp @@ -76,7 +76,7 @@ public: bool is_used() override; void apply_event(kernel::profile::Event* event, double value) override; kernel::resource::Action* execution_start(double size) override; - kernel::resource::Action* execution_start(double size, int requested_cores) override + kernel::resource::Action* execution_start(double, int) override { THROW_UNIMPLEMENTED; return nullptr; -- 2.20.1