Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] const++
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 1 Feb 2020 13:11:52 +0000 (14:11 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 1 Feb 2020 21:41:45 +0000 (22:41 +0100)
teshsuite/mc/mutex-handling/mutex-handling.cpp

index ed591b9..4e00e3d 100644 (file)
@@ -29,8 +29,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example")
 
 static int receiver(const char* box_name)
 {
-  int* payload;
   auto mb = simgrid::s4u::Mailbox::by_name(box_name);
+  const int* payload;
 
   payload = static_cast<int*>(mb->get());
   MC_assert(*payload == 1);