Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[pvs-studio] No need to assign variable the same value.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 19 Jul 2021 11:16:40 +0000 (13:16 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 19 Jul 2021 11:18:10 +0000 (13:18 +0200)
src/mc/api.cpp
src/mc/inspect/mc_member.cpp
src/mc/mc_smx.cpp

index cdb3224..b477078 100644 (file)
@@ -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;
index 2299d30..a3447bf 100644 (file)
@@ -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;
index cc216b8..e503049 100644 (file)
@@ -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<simgrid::kernel::actor::ActorImpl>(data[i]);
-    info.hostname = nullptr;
     process->read_bytes(&info.copy, sizeof(info.copy), remote(data[i]));
     target.push_back(std::move(info));
   }