From b864519604ce0a81ae236c8592e5e94091711a96 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 19 Jul 2021 13:16:40 +0200 Subject: [PATCH] [pvs-studio] No need to assign variable the same value. --- src/mc/api.cpp | 4 ---- src/mc/inspect/mc_member.cpp | 2 -- src/mc/mc_smx.cpp | 1 - 3 files changed, 7 deletions(-) diff --git a/src/mc/api.cpp b/src/mc/api.cpp index cdb3224e49..b477078ece 100644 --- a/src/mc/api.cpp +++ b/src/mc/api.cpp @@ -115,7 +115,6 @@ static inline smx_simcall_t MC_state_choose_request_for_process(const RemoteProc } else switch (actor->simcall_.call_) { case Simcall::COMM_WAITANY: - state->transition_.times_considered_ = -1; while (procstate->get_times_considered() < simcall_comm_waitany__get__count(&actor->simcall_)) { if (simgrid::mc::request_is_enabled_by_idx(process, &actor->simcall_, procstate->get_times_considered())) { state->transition_.times_considered_ = procstate->get_times_considered_and_inc(); @@ -131,7 +130,6 @@ static inline smx_simcall_t MC_state_choose_request_for_process(const RemoteProc break; case Simcall::COMM_TESTANY: - state->transition_.times_considered_ = -1; while (procstate->get_times_considered() < simcall_comm_testany__get__count(&actor->simcall_)) { if (simgrid::mc::request_is_enabled_by_idx(process, &actor->simcall_, procstate->get_times_considered())) { state->transition_.times_considered_ = procstate->get_times_considered_and_inc(); @@ -157,8 +155,6 @@ static inline smx_simcall_t MC_state_choose_request_for_process(const RemoteProc else if (act->src_actor_.get() == nullptr && act->state_ == simgrid::kernel::activity::State::READY && act->detached()) state->transition_.times_considered_ = 0; // OK - else - state->transition_.times_considered_ = -1; // timeout procstate->set_done(); req = &actor->simcall_; break; diff --git a/src/mc/inspect/mc_member.cpp b/src/mc/inspect/mc_member.cpp index 2299d304ca..a3447bf1eb 100644 --- a/src/mc/inspect/mc_member.cpp +++ b/src/mc/inspect/mc_member.cpp @@ -22,8 +22,6 @@ void* resolve_member(const void* base, const simgrid::mc::Type* /*type*/, const const simgrid::mc::AddressSpace* address_space) { ExpressionContext state; - state.frame_base = nullptr; - state.cursor = nullptr; state.address_space = address_space; ExpressionStack stack; diff --git a/src/mc/mc_smx.cpp b/src/mc/mc_smx.cpp index cc216b8bfd..e50304986a 100644 --- a/src/mc/mc_smx.cpp +++ b/src/mc/mc_smx.cpp @@ -52,7 +52,6 @@ static void MC_process_refresh_simix_actor_dynar(const simgrid::mc::RemoteProces simgrid::mc::ActorInformation info; info.address = simgrid::mc::RemotePtr(data[i]); - info.hostname = nullptr; process->read_bytes(&info.copy, sizeof(info.copy), remote(data[i])); target.push_back(std::move(info)); } -- 2.20.1