X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a3e3c75a39a2b73a07bcf209d6516791b80968bb..575da6eb0c35cfee471dcdce960cc4b30440532d:/examples/c/exec-waitany/exec-waitany.c diff --git a/examples/c/exec-waitany/exec-waitany.c b/examples/c/exec-waitany/exec-waitany.c index ef353fe107..e65ade7005 100644 --- a/examples/c/exec-waitany/exec-waitany.c +++ b/examples/c/exec-waitany/exec-waitany.c @@ -8,8 +8,8 @@ #include "simgrid/exec.h" #include "simgrid/host.h" -#include "xbt/asserts.h" #include "xbt/log.h" +#include "xbt/sysdep.h" XBT_LOG_NEW_DEFAULT_CATEGORY(exec_waitany, "Messages specific for this example"); @@ -41,7 +41,7 @@ static void worker(int argc, char* argv[]) * terminated. */ while (pending_execs_count > 0) { - int pos; + ssize_t pos; if (with_timeout) pos = sg_exec_wait_any_for(pending_execs, pending_execs_count, 4); else @@ -51,7 +51,7 @@ static void worker(int argc, char* argv[]) XBT_INFO("Do not wait any longer for an activity"); pending_execs_count = 0; } else { - XBT_INFO("Activity at position %d is complete", pos); + XBT_INFO("Activity at position %zd is complete", pos); memmove(pending_execs + pos, pending_execs + pos + 1, sizeof(sg_exec_t) * (pending_execs_count - pos - 1)); pending_execs_count--; }