From: Arnaud Giersch Date: Fri, 1 Mar 2019 17:37:59 +0000 (+0100) Subject: Kill unused parameter and please Sonar. X-Git-Tag: v3_22~189 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8468bc54da69c09b898b86e37bd5515edc7fdb3f Kill unused parameter and please Sonar. --- diff --git a/src/mc/checker/CommunicationDeterminismChecker.cpp b/src/mc/checker/CommunicationDeterminismChecker.cpp index f9e5fb1853..0b3c59ae89 100644 --- a/src/mc/checker/CommunicationDeterminismChecker.cpp +++ b/src/mc/checker/CommunicationDeterminismChecker.cpp @@ -167,8 +167,8 @@ void CommunicationDeterminismChecker::deterministic_comm_pattern(int process, si /********** Non Static functions ***********/ -void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_simcall_t request, - e_mc_call_type_t call_type, int backtracking) +void CommunicationDeterminismChecker::get_comm_pattern(smx_simcall_t request, e_mc_call_type_t call_type, + int backtracking) { const smx_actor_t issuer = MC_smx_simcall_get_issuer(request); simgrid::mc::PatternCommunicationList* initial_pattern = @@ -257,8 +257,7 @@ void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_sim } void CommunicationDeterminismChecker::complete_comm_pattern( - xbt_dynar_t list, simgrid::mc::RemotePtr comm_addr, unsigned int issuer, - int backtracking) + simgrid::mc::RemotePtr comm_addr, unsigned int issuer, int backtracking) { simgrid::mc::PatternCommunication* current_comm_pattern; unsigned int cursor = 0; @@ -422,7 +421,7 @@ void CommunicationDeterminismChecker::restoreState() /* TODO : handle test and testany simcalls */ e_mc_call_type_t call = MC_get_call_type(req); mc_model_checker->handle_simcall(state->transition); - MC_handle_comm_pattern(call, req, req_num, nullptr, 1); + MC_handle_comm_pattern(call, req, req_num, 1); mc_model_checker->wait_for_requests(); /* Update statistics */ @@ -473,10 +472,7 @@ void CommunicationDeterminismChecker::real_run() mc_model_checker->handle_simcall(state->transition); /* After this call req is no longer useful */ - if (not this->initial_communications_pattern_done) - MC_handle_comm_pattern(call, req, req_num, initial_communications_pattern, 0); - else - MC_handle_comm_pattern(call, req, req_num, nullptr, 0); + MC_handle_comm_pattern(call, req, req_num, 0); /* Wait for requests (schedules processes) */ mc_model_checker->wait_for_requests(); diff --git a/src/mc/checker/CommunicationDeterminismChecker.hpp b/src/mc/checker/CommunicationDeterminismChecker.hpp index 594c65df86..72b4931e7c 100644 --- a/src/mc/checker/CommunicationDeterminismChecker.hpp +++ b/src/mc/checker/CommunicationDeterminismChecker.hpp @@ -34,9 +34,9 @@ private: void restoreState(); public: // These are used by functions which should be moved in CommunicationDeterminismChecker: - void get_comm_pattern(xbt_dynar_t list, smx_simcall_t request, e_mc_call_type_t call_type, int backtracking); - void complete_comm_pattern(xbt_dynar_t list, simgrid::mc::RemotePtr comm_addr, - unsigned int issuer, int backtracking); + void get_comm_pattern(smx_simcall_t request, e_mc_call_type_t call_type, int backtracking); + void complete_comm_pattern(simgrid::mc::RemotePtr comm_addr, unsigned int issuer, + int backtracking); private: /** Stack representing the position in the exploration graph */ diff --git a/src/mc/mc_comm_pattern.cpp b/src/mc/mc_comm_pattern.cpp index 0d6bd6bc79..0614251e76 100644 --- a/src/mc/mc_comm_pattern.cpp +++ b/src/mc/mc_comm_pattern.cpp @@ -65,9 +65,7 @@ void MC_state_copy_index_communications_pattern(simgrid::mc::State* state) state->communicationIndices.push_back(list_process_comm->index_comm); } -void MC_handle_comm_pattern( - e_mc_call_type_t call_type, smx_simcall_t req, - int value, xbt_dynar_t pattern, int backtracking) +void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t req, int value, int backtracking) { // HACK, do not rely on the Checker implementation outside of it simgrid::mc::CommunicationDeterminismChecker* checker = @@ -78,7 +76,7 @@ void MC_handle_comm_pattern( break; case MC_CALL_TYPE_SEND: case MC_CALL_TYPE_RECV: - checker->get_comm_pattern(pattern, req, call_type, backtracking); + checker->get_comm_pattern(req, call_type, backtracking); break; case MC_CALL_TYPE_WAIT: case MC_CALL_TYPE_WAITANY: @@ -92,7 +90,7 @@ void MC_handle_comm_pattern( addr = mc_model_checker->process().read(remote(simcall_comm_waitany__getraw__comms(req) + value)); comm_addr = remote(static_cast(addr)); } - checker->complete_comm_pattern(pattern, comm_addr, MC_smx_simcall_get_issuer(req)->get_pid(), backtracking); + checker->complete_comm_pattern(comm_addr, MC_smx_simcall_get_issuer(req)->get_pid(), backtracking); } break; default: diff --git a/src/mc/mc_comm_pattern.hpp b/src/mc/mc_comm_pattern.hpp index 4aab5a0854..b1bf3133fb 100644 --- a/src/mc/mc_comm_pattern.hpp +++ b/src/mc/mc_comm_pattern.hpp @@ -68,8 +68,7 @@ static inline e_mc_call_type_t MC_get_call_type(smx_simcall_t req) } } -XBT_PRIVATE void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t request, int value, - xbt_dynar_t current_pattern, int backtracking); +XBT_PRIVATE void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t request, int value, int backtracking); XBT_PRIVATE void MC_restore_communications_pattern(simgrid::mc::State* state);