Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Evaluating the expression of xbt_assert must not have side effects.
[simgrid.git] / examples / msg / icomms / peer2.c
index 0d3fb0a..7f60c2c 100644 (file)
@@ -66,8 +66,8 @@ int receiver(int argc, char *argv[])
   int id = -1;
   char mailbox[80];
   msg_comm_t res_irecv;
-  xbt_assert1(sscanf(argv[1], "%d", &id),
-              "Invalid argument %s\n", argv[1]);
+  int read = sscanf(argv[1], "%d", &id)
+  xbt_assert1(read, "Invalid argument %s\n", argv[1]);
   MSG_process_sleep(10);
   sprintf(mailbox, "receiver-%d", id);
   while (1) {