Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Explicit cast when loosing precision (C examples).
[simgrid.git] / examples / c / comm-waitany / comm-waitany.c
index 248a219..cd99dd3 100644 (file)
@@ -82,7 +82,7 @@ static void sender(int argc, char* argv[])
 static void receiver(int argc, char* argv[])
 {
   xbt_assert(argc == 2, "Expecting one parameter from the XML deployment file but got %d", argc);
-  int id = xbt_str_parse_int(argv[1], "ID should be numerical, not %s");
+  int id = (int)xbt_str_parse_int(argv[1], "ID should be numerical, not %s");
   char mailbox_name[80];
   snprintf(mailbox_name, 79, "receiver-%d", id);
   sg_mailbox_t mbox = sg_mailbox_by_name(mailbox_name);