Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix MC+gcc builds
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 16 Feb 2023 10:05:59 +0000 (11:05 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 16 Feb 2023 10:05:59 +0000 (11:05 +0100)
src/mc/api/ActorState.hpp
src/mc/api/State.cpp
src/mc/remote/Channel.cpp

index 3288ae8..1265dca 100644 (file)
@@ -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<Transition> 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);
index f91a369..dfb48f3 100644 (file)
@@ -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",
index 60d5989..1d3c389 100644 (file)
@@ -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));