Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar and codefactor
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 25 Feb 2020 09:38:32 +0000 (10:38 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 25 Feb 2020 10:53:13 +0000 (11:53 +0100)
examples/s4u/async-wait/s4u-async-wait.cpp
teshsuite/s4u/host-on-off-recv/host-on-off-recv.cpp

index 0673125..95b883d 100644 (file)
@@ -56,7 +56,7 @@ static void sender(int argc, char** argv)
 }
 
 /* Receiver actor expects 1 argument: its ID */
-static void receiver(int argc, char** argv)
+static void receiver(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char** argv)
 {
   double sleep_start_time = 1.0;
   double sleep_test_time  = 0.1;
@@ -79,7 +79,7 @@ static void receiver(int argc, char** argv)
       comm->wait();
     }
 
-    std::string* received = static_cast<std::string*>(payload);
+    const std::string* received = static_cast<std::string*>(payload);
     XBT_INFO("I got a '%s'.", received->c_str());
     if (*received == "finalize")
       cont = false; // If it's a finalize message, we're done.
index 3dc299e..af1dda5 100644 (file)
@@ -52,7 +52,6 @@ static void worker()
 
 int main(int argc, char* argv[])
 {
-
   simgrid::s4u::Engine e(&argc, argv);
   xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s small_platform.xml\n", argv[0], argv[0]);