Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Constify pointer and reference local variables in teshsuite/.
[simgrid.git] / teshsuite / s4u / listen_async / listen_async.cpp
index 1e64d69..49a2185 100644 (file)
@@ -21,7 +21,7 @@ static void server()
 
   xbt_assert(mailbox->listen()); // True (1)
   XBT_INFO("Task listen works on regular mailboxes");
-  std::string* res = static_cast<std::string*>(mailbox->get());
+  const std::string* res = static_cast<std::string*>(mailbox->get());
 
   xbt_assert(*res == "Some data", "Data received: %s", res->c_str());
   XBT_INFO("Data successfully received from regular mailbox");