From: mlaurent Date: Mon, 27 Mar 2023 20:43:54 +0000 (+0200) Subject: Abide by both compiler warnings X-Git-Tag: v3.34~240^2~5 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/788fd4a0324f3ef5aa40f37eb6e4c8c5accd1164 Abide by both compiler warnings --- diff --git a/src/mc/explo/DFSExplorer.cpp b/src/mc/explo/DFSExplorer.cpp index 9e4718466a..8f911cc9fb 100644 --- a/src/mc/explo/DFSExplorer.cpp +++ b/src/mc/explo/DFSExplorer.cpp @@ -63,13 +63,10 @@ void DFSExplorer::check_non_termination(const State* current_state) RecordTrace DFSExplorer::get_record_trace() // override { - RecordTrace res; - for (auto const& state : stack_) - res.push_back(state->get_transition()); - return res; + return get_record_trace_of_stack(stack_); } -RecordTrace get_record_trace_of_stack(stack_t stack) +RecordTrace DFSExplorer::get_record_trace_of_stack(stack_t stack) { RecordTrace res; for (auto const& state : stack) @@ -268,7 +265,7 @@ void DFSExplorer::backtrack() { backtrack_count_++; XBT_VERB("Backtracking from %s", get_record_trace().to_string().c_str()); - XBT_DEBUG("%ld alternatives are yet to be explored:", opened_states_.size()); + XBT_DEBUG("%lu alternatives are yet to be explored:", opened_states_.size()); for (auto& stack : opened_states_) XBT_DEBUG("--> %s", get_record_trace_of_stack(stack).to_string().c_str()); on_backtracking_signal(get_remote_app()); diff --git a/src/mc/explo/DFSExplorer.hpp b/src/mc/explo/DFSExplorer.hpp index 728981c03d..9301ed2e17 100644 --- a/src/mc/explo/DFSExplorer.hpp +++ b/src/mc/explo/DFSExplorer.hpp @@ -97,6 +97,8 @@ private: * When backtracking, we pick a state from it*/ std::list opened_states_; void add_to_opened_states(stack_t stack); + + RecordTrace get_record_trace_of_stack(stack_t stack); }; } // namespace simgrid::mc