From: Martin Quinson Date: Thu, 16 Feb 2023 10:05:59 +0000 (+0100) Subject: fix MC+gcc builds X-Git-Tag: v3.34~521 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5010356b3ded0a463dae327544f6898d57c1e275?hp=41b6f36bc0ca61e0169a3166bb16efbda2d3baef fix MC+gcc builds --- diff --git a/src/mc/api/ActorState.hpp b/src/mc/api/ActorState.hpp index 3288ae8aa6..1265dca4c9 100644 --- a/src/mc/api/ActorState.hpp +++ b/src/mc/api/ActorState.hpp @@ -118,7 +118,7 @@ public: inline Transition* get_transition(unsigned times_considered) { xbt_assert(times_considered < this->pending_transitions_.size(), - "Actor %lu does not have a state available transition with `times_considered = %d`,\n" + "Actor %ld does not have a state available transition with `times_considered = %u`,\n" "yet one was asked for", aid_, times_considered); return this->pending_transitions_[times_considered].get(); @@ -127,7 +127,7 @@ public: inline void set_transition(std::unique_ptr t, unsigned times_considered) { xbt_assert(times_considered < this->pending_transitions_.size(), - "Actor %lu does not have a state available transition with `times_considered = %d`, " + "Actor %ld does not have a state available transition with `times_considered = %u`, " "yet one was attempted to be set", aid_, times_considered); this->pending_transitions_[times_considered] = std::move(t); diff --git a/src/mc/api/State.cpp b/src/mc/api/State.cpp index f91a36959a..dfb48f399a 100644 --- a/src/mc/api/State.cpp +++ b/src/mc/api/State.cpp @@ -57,7 +57,7 @@ void State::execute_next(aid_t next) const unsigned times_considered = actor_state.do_consider(); const auto* expected_executed_transition = actor_state.get_transition(times_considered); xbt_assert(expected_executed_transition != nullptr, - "Expected a transition with %d times considered to be noted in actor %lu", times_considered, next); + "Expected a transition with %u times considered to be noted in actor %ld", times_considered, next); XBT_DEBUG("Let's run actor %ld (times_considered = %u)", next, times_considered); @@ -65,7 +65,7 @@ void State::execute_next(aid_t next) Transition::executed_transitions_++; auto* just_executed = mc_model_checker->handle_simcall(next, times_considered, true); xbt_assert(just_executed->type_ == expected_executed_transition->type_, - "The transition that was just executed by actor %lu, viz:\n" + "The transition that was just executed by actor %ld, viz:\n" "%s\n" "is not what was purportedly scheduled to execute, which was:\n" "%s\n", diff --git a/src/mc/remote/Channel.cpp b/src/mc/remote/Channel.cpp index 60d59894bf..1d3c38903c 100644 --- a/src/mc/remote/Channel.cpp +++ b/src/mc/remote/Channel.cpp @@ -47,9 +47,9 @@ ssize_t Channel::receive(void* message, size_t size, bool block) const ssize_t res = recv(this->socket_, message, size, block ? 0 : MSG_DONTWAIT); if (res != -1) { if (is_valid_MessageType(*(int*)message)) { - XBT_DEBUG("Receive %s (requested %lu; received %lu)", to_c_str(*(MessageType*)message), size, res); + XBT_DEBUG("Receive %s (requested %lu; received %ld)", to_c_str(*(MessageType*)message), size, res); } else { - XBT_DEBUG("Receive %lu bytes", res); + XBT_DEBUG("Receive %ld bytes", res); } } else { XBT_ERROR("Channel::receive failure: %s", strerror(errno));