Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Unused import.
[simgrid.git] / examples / c / comm-waitany / comm-waitany.c
index ea987fb..b93bc28 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -64,13 +64,13 @@ static void sender(int argc, char* argv[])
    * Even in this simple example, the pending comms do not terminate in the exact same order of creation.
    */
   while (pending_comms_count != 0) {
-    int changed_pos = sg_comm_wait_any(pending_comms, pending_comms_count);
+    ssize_t changed_pos = sg_comm_wait_any(pending_comms, pending_comms_count);
     memmove(pending_comms + changed_pos, pending_comms + changed_pos + 1,
             sizeof(sg_comm_t) * (pending_comms_count - changed_pos - 1));
     pending_comms_count--;
 
     if (changed_pos != 0)
-      XBT_INFO("Remove the %dth pending comm: it terminated earlier than another comm that was initiated first.",
+      XBT_INFO("Remove the %zdth pending comm: it terminated earlier than another comm that was initiated first.",
                changed_pos);
   }
 
@@ -106,7 +106,7 @@ int main(int argc, char* argv[])
   simgrid_init(&argc, argv);
   xbt_assert(argc > 2,
              "Usage: %s platform_file deployment_file\n"
-             "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+             "\tExample: %s platform.xml deployment.xml\n",
              argv[0], argv[0]);
 
   simgrid_load_platform(argv[1]);