Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix format strings to match their arguments.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 21 Feb 2012 15:50:01 +0000 (16:50 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 21 Feb 2012 15:50:01 +0000 (16:50 +0100)
41 files changed:
examples/msg/chord/chord.c
src/amok/Bandwidth/bandwidth.c
src/amok/Bandwidth/saturate.c
src/gras/Msg/gras_msg_exchange.c
src/gras/Msg/gras_msg_types.c
src/gras/Msg/rl_msg.c
src/gras/Msg/rpc.c
src/gras/Msg/sg_msg.c
src/gras/Transport/transport.c
src/gras/Transport/transport_plugin_file.c
src/gras/Transport/transport_plugin_sg.c
src/gras/Virtu/process.c
src/gras/Virtu/sg_process.c
src/msg/msg_gos.c
src/simdag/sd_daxloader.c
src/simdag/sd_task.c
src/simix/smx_global.c
src/simix/smx_host.c
src/simix/smx_io.c
src/simix/smx_network.c
src/simix/smx_process.c
src/simix/smx_smurf.c
src/simix/smx_synchro.c
src/xbt/config.c
src/xbt/datadesc/cbps.c
src/xbt/datadesc/datadesc.c
src/xbt/datadesc/ddt_create.c
src/xbt/datadesc/ddt_exchange.c
src/xbt/datadesc/ddt_parse.c
src/xbt/dict.c
src/xbt/dynar.c
src/xbt/graph.c
src/xbt/set.c
src/xbt/xbt_matrix.c
src/xbt/xbt_socket.c
src/xbt/xbt_synchro.c
src/xbt/xbt_trp_plugin_tcp.c
teshsuite/gras/datadesc/datadesc_usage.c
testsuite/xbt/parmap_bench.c
tools/tesh/run_context.c
tools/tesh/signal.c

index 9995fb6..038c754 100644 (file)
@@ -461,7 +461,7 @@ static void handle_task(node_t node, m_task_t task) {
 
     case TASK_FIND_SUCCESSOR_ANSWER:
     case TASK_GET_PREDECESSOR_ANSWER:
 
     case TASK_FIND_SUCCESSOR_ANSWER:
     case TASK_GET_PREDECESSOR_ANSWER:
-      XBT_DEBUG("Ignoring unexpected task of type %d (%p)", type, task);
+      XBT_DEBUG("Ignoring unexpected task of type %d (%p)", (int)type, task);
       task_free(task);
       break;
   }
       task_free(task);
       break;
   }
@@ -626,7 +626,7 @@ static int remote_find_successor(node_t node, int ask_to, int id)
 
       if (res != MSG_OK) {
         XBT_DEBUG("Failed to receive the answer to my 'Find Successor' request (task %p): %d",
 
       if (res != MSG_OK) {
         XBT_DEBUG("Failed to receive the answer to my 'Find Successor' request (task %p): %d",
-            task_sent, res);
+                  task_sent, (int)res);
         stop = 1;
        MSG_comm_destroy(node->comm_receive);
        node->comm_receive = NULL;
         stop = 1;
        MSG_comm_destroy(node->comm_receive);
        node->comm_receive = NULL;
@@ -707,7 +707,7 @@ static int remote_get_predecessor(node_t node, int ask_to)
 
       if (res != MSG_OK) {
         XBT_DEBUG("Failed to receive the answer to my 'Get Predecessor' request (task %p): %d",
 
       if (res != MSG_OK) {
         XBT_DEBUG("Failed to receive the answer to my 'Get Predecessor' request (task %p): %d",
-            task_sent, res);
+                  task_sent, (int)res);
         stop = 1;
        MSG_comm_destroy(node->comm_receive);
        node->comm_receive = NULL;
         stop = 1;
        MSG_comm_destroy(node->comm_receive);
        node->comm_receive = NULL;
index d28219c..6e917ce 100644 (file)
@@ -168,7 +168,7 @@ void amok_bw_test(xbt_socket_t peer,
   request->peer.name = NULL;
   request->peer.port = xbt_socket_my_port(measMasterIn);
   XBT_DEBUG
   request->peer.name = NULL;
   request->peer.port = xbt_socket_my_port(measMasterIn);
   XBT_DEBUG
-      ("Handshaking with %s:%d to connect it back on my %d (bufsize=%ld, msg_size=%ld, msg_amount=%ld)",
+      ("Handshaking with %s:%d to connect it back on my %d (bufsize=%lu, msg_size=%lu, msg_amount=%lu)",
        xbt_socket_peer_name(peer), xbt_socket_peer_port(peer),
        request->peer.port, request->buf_size, request->msg_size,
        request->msg_amount);
        xbt_socket_peer_name(peer), xbt_socket_peer_port(peer),
        request->peer.port, request->buf_size, request->msg_size,
        request->msg_amount);
@@ -192,7 +192,7 @@ void amok_bw_test(xbt_socket_t peer,
          xbt_socket_peer_name(peer), request_ack->peer.port);
   }
   XBT_DEBUG
          xbt_socket_peer_name(peer), request_ack->peer.port);
   }
   XBT_DEBUG
-      ("Got ACK; conduct the experiment (msg_size = %ld, msg_amount=%ld)",
+      ("Got ACK; conduct the experiment (msg_size = %lu, msg_amount=%lu)",
        request->msg_size, request->msg_amount);
 
   *sec = 0;
        request->msg_size, request->msg_amount);
 
   *sec = 0;
@@ -462,7 +462,7 @@ void amok_bw_request(const char *from_name, unsigned int from_port,
 
 
 
 
 
 
-  XBT_DEBUG("Ask for a BW test between %s:%d and %s:%d", from_name, from_port,
+  XBT_DEBUG("Ask for a BW test between %s:%u and %s:%u", from_name, from_port,
          to_name, to_port);
   gras_msg_rpccall(sock, 20 * 60, "BW request", &request, &result);
 
          to_name, to_port);
   gras_msg_rpccall(sock, 20 * 60, "BW request", &request, &result);
 
@@ -471,7 +471,7 @@ void amok_bw_request(const char *from_name, unsigned int from_port,
   if (bw)
     *bw = result->bw;
 
   if (bw)
     *bw = result->bw;
 
-  XBT_VERB("BW test (%s:%d -> %s:%d) took %f sec (%f kb/s)",
+  XBT_VERB("BW test (%s:%u -> %s:%u) took %f sec (%f kb/s)",
         from_name, from_port, to_name, to_port,
         result->sec, ((double) result->bw) / 1024.0);
 
         from_name, from_port, to_name, to_port,
         result->sec, ((double) result->bw) / 1024.0);
 
@@ -489,7 +489,7 @@ int amok_bw_cb_bw_request(gras_msg_cb_ctx_t ctx, void *payload)
   xbt_socket_t peer, asker;
 
   asker = gras_msg_cb_ctx_from(ctx);
   xbt_socket_t peer, asker;
 
   asker = gras_msg_cb_ctx_from(ctx);
-  XBT_VERB("Asked by %s:%d to conduct a bw XP with %s:%d (request: %ld %ld)",
+  XBT_VERB("Asked by %s:%d to conduct a bw XP with %s:%d (request: %lu %lu)",
         xbt_socket_peer_name(asker), xbt_socket_peer_port(asker),
         request->peer.name, request->peer.port,
         request->msg_size, request->msg_amount);
         xbt_socket_peer_name(asker), xbt_socket_peer_port(asker),
         request->peer.name, request->peer.port,
         request->msg_size, request->msg_amount);
index 191f18a..fc374dd 100644 (file)
@@ -79,7 +79,7 @@ void amok_bw_saturate_start(const char *from_name, unsigned int from_port,
   xbt_socket_t sock;
   sat_request_t request = xbt_new(s_sat_request_t, 1);
 
   xbt_socket_t sock;
   sat_request_t request = xbt_new(s_sat_request_t, 1);
 
-  XBT_VERB("Start from_name %s:%d -> to_name %s:%d",
+  XBT_VERB("Start from_name %s:%u -> to_name %s:%u",
         from_name, from_port, to_name, to_port);
   sock = gras_socket_client(from_name, from_port);
 
         from_name, from_port, to_name, to_port);
   sock = gras_socket_client(from_name, from_port);
 
@@ -151,7 +151,7 @@ void amok_bw_saturate_begin(const char *to_name, unsigned int to_port,
   /* Negociate the saturation with the peer */
   sat_request_t request = xbt_new(s_sat_request_t, 1);
 
   /* Negociate the saturation with the peer */
   sat_request_t request = xbt_new(s_sat_request_t, 1);
 
-  XBT_DEBUG("Begin to saturate to %s:%d", to_name, to_port);
+  XBT_DEBUG("Begin to saturate to %s:%u", to_name, to_port);
   memset(&msg_got, 0, sizeof(msg_got));
 
   request->msg_size = msg_size;
   memset(&msg_got, 0, sizeof(msg_got));
 
   request->msg_size = msg_size;
@@ -170,7 +170,7 @@ void amok_bw_saturate_begin(const char *to_name, unsigned int to_port,
                  1,             /* at least one sec */
                  &sec, &bw);
     msg_size = request->msg_size = (int) bw;
                  1,             /* at least one sec */
                  &sec, &bw);
     msg_size = request->msg_size = (int) bw;
-    XBT_DEBUG("Saturate with packets of %d bytes", request->msg_size);
+    XBT_DEBUG("Saturate with packets of %u bytes", request->msg_size);
   }
 
   /* Launch the saturation */
   }
 
   /* Launch the saturation */
@@ -186,7 +186,7 @@ void amok_bw_saturate_begin(const char *to_name, unsigned int to_port,
   free(request);
 
   gras_socket_close(peer_cmd);
   free(request);
 
   gras_socket_close(peer_cmd);
-  XBT_INFO("Saturation(%s:%d->%s:%d) started", gras_os_myname(),
+  XBT_INFO("Saturation(%s:%d->%s:%u) started", gras_os_myname(),
         gras_os_myport(), to_name, to_port);
 
   /* Start experiment */
         gras_os_myport(), to_name, to_port);
 
   /* Start experiment */
@@ -215,7 +215,7 @@ void amok_bw_saturate_begin(const char *to_name, unsigned int to_port,
 
     /* Check whether the experiment has to be terminated by now */
     elapsed = gras_os_time() - start;
 
     /* Check whether the experiment has to be terminated by now */
     elapsed = gras_os_time() - start;
-    XBT_DEBUG("elapsed %f duration %f (msg_size=%d)", elapsed, duration,
+    XBT_DEBUG("elapsed %f duration %f (msg_size=%u)", elapsed, duration,
            msg_size);
 
   } while (saturate_further && (duration == 0 || elapsed < duration));
            msg_size);
 
   } while (saturate_further && (duration == 0 || elapsed < duration));
@@ -232,7 +232,7 @@ void amok_bw_saturate_begin(const char *to_name, unsigned int to_port,
     bw_res_t answer = xbt_new(s_bw_res_t, 1);
     s_gras_msg_cb_ctx_t ctx;
 
     bw_res_t answer = xbt_new(s_bw_res_t, 1);
     s_gras_msg_cb_ctx_t ctx;
 
-    XBT_INFO("Saturation from %s:%d to %s:%d stopped by %s:%d",
+    XBT_INFO("Saturation from %s:%d to %s:%u stopped by %s:%d",
           gras_os_myname(), gras_os_myport(), to_name, to_port,
           xbt_socket_peer_name(msg_got.expe),
           xbt_socket_peer_port(msg_got.expe));
           gras_os_myname(), gras_os_myport(), to_name, to_port,
           xbt_socket_peer_name(msg_got.expe),
           xbt_socket_peer_port(msg_got.expe));
@@ -248,7 +248,7 @@ void amok_bw_saturate_begin(const char *to_name, unsigned int to_port,
     free(answer);
   } else {
     XBT_INFO
     free(answer);
   } else {
     XBT_INFO
-        ("Saturation from %s:%d to %s:%d elapsed after %f sec (achieving %f kb/s)",
+        ("Saturation from %s:%d to %s:%u elapsed after %f sec (achieving %f kb/s)",
          gras_os_myname(), gras_os_myport(), to_name, to_port, elapsed,
          bw / 1024.0);
   }
          gras_os_myname(), gras_os_myport(), to_name, to_port, elapsed,
          bw / 1024.0);
   }
@@ -332,12 +332,12 @@ void amok_bw_saturate_stop(const char *from_name, unsigned int from_port,
 {
   xbt_socket_t sock = gras_socket_client(from_name, from_port);
   bw_res_t answer;
 {
   xbt_socket_t sock = gras_socket_client(from_name, from_port);
   bw_res_t answer;
-  XBT_VERB("Ask %s:%d to stop the saturation", from_name, from_port);
+  XBT_VERB("Ask %s:%u to stop the saturation", from_name, from_port);
   TRY {
     gras_msg_rpccall(sock, 60, "amok_bw_sat stop", NULL, &answer);
   }
   CATCH_ANONYMOUS {
   TRY {
     gras_msg_rpccall(sock, 60, "amok_bw_sat stop", NULL, &answer);
   }
   CATCH_ANONYMOUS {
-    RETHROWF("Cannot ask %s:%d to stop saturation: %s", from_name, from_port);
+    RETHROWF("Cannot ask %s:%u to stop saturation: %s", from_name, from_port);
   }
   gras_socket_close(sock);
   if (time)
   }
   gras_socket_close(sock);
   if (time)
index 993ae1e..4ef5303 100644 (file)
@@ -402,7 +402,7 @@ void gras_msg_handle(volatile double timeOut)
         volatile unsigned int cpt2 = cpt;
         if (!ran_ok) {
           XBT_DEBUG
         volatile unsigned int cpt2 = cpt;
         if (!ran_ok) {
           XBT_DEBUG
-              ("Use the callback #%d (@%p) for incomming msg '%s' (payload_size=%d)",
+              ("Use the callback #%u (@%p) for incomming msg '%s' (payload_size=%d)",
                cpt + 1, cb, msg.type->name, msg.payl_size);
           if (!cb(&ctx, msg.payl)) {
             /* cb handled the message */
                cpt + 1, cb, msg.type->name, msg.payl_size);
           if (!cb(&ctx, msg.payl)) {
             /* cb handled the message */
@@ -442,7 +442,7 @@ void gras_msg_handle(volatile double timeOut)
         ran_ok = 1;
       } else {
         RETHROWF
         ran_ok = 1;
       } else {
         RETHROWF
-            ("Callback #%d (@%p) to message '%s' (payload size: %d) raised an exception: %s",
+            ("Callback #%u (@%p) to message '%s' (payload size: %d) raised an exception: %s",
              cpt + 1, cb, msg.type->name, msg.payl_size);
       }
     }
              cpt + 1, cb, msg.type->name, msg.payl_size);
       }
     }
@@ -481,7 +481,7 @@ void gras_msg_handle(volatile double timeOut)
 
   default:
     THROWF(unknown_error, 0,
 
   default:
     THROWF(unknown_error, 0,
-           "Cannot handle messages of kind %d yet", msg.type->kind);
+           "Cannot handle messages of kind %d yet", (int)msg.type->kind);
   }
 
 }
   }
 
 }
index a2f5d07..8d43297 100644 (file)
@@ -289,7 +289,7 @@ void gras_cb_unregister_(gras_msgtype_t msgtype, gras_msg_cb_t cb)
     }
   }
   if (!found)
     }
   }
   if (!found)
-    XBT_VERB("Ignoring removal of unexisting callback to msg id %d",
+    XBT_VERB("Ignoring removal of unexisting callback to msg id %u",
           msgtype->code);
 }
 
           msgtype->code);
 }
 
index a973c66..738b911 100644 (file)
@@ -63,7 +63,7 @@ void gras_msg_send_ext(xbt_socket_t sock,
     break;
 
   default:
     break;
 
   default:
-    THROWF(unknown_error, 0, "Unknown msg kind %d", kind);
+    THROWF(unknown_error, 0, "Unknown msg kind %d", (int)kind);
   }
 
   xbt_datadesc_send(sock, string_type, &msgtype->name);
   }
 
   xbt_datadesc_send(sock, string_type, &msgtype->name);
index 608e06c..9dd7549 100644 (file)
@@ -87,7 +87,7 @@ static int msgfilter_rpcID(gras_msg_t msg, void *ctx)
   xbt_dynar_foreach(_gras_rpc_cancelled, cursor, rpc_ctx) {
     if (msg->ID == rpc_ctx->ID && msg->kind == e_gras_msg_kind_rpcanswer) {
       XBT_VERB
   xbt_dynar_foreach(_gras_rpc_cancelled, cursor, rpc_ctx) {
     if (msg->ID == rpc_ctx->ID && msg->kind == e_gras_msg_kind_rpcanswer) {
       XBT_VERB
-          ("Got an answer to the already canceled (timeouted?) RPC %ld. Ignore it (leaking the payload!).",
+          ("Got an answer to the already canceled (timeouted?) RPC %lu. Ignore it (leaking the payload!).",
            msg->ID);
       xbt_dynar_cursor_rm(_gras_rpc_cancelled, &cursor);
       return 1;
            msg->ID);
       xbt_dynar_cursor_rm(_gras_rpc_cancelled, &cursor);
       return 1;
@@ -172,7 +172,7 @@ void gras_msg_rpc_async_wait(gras_msg_cb_ctx_t ctx, void *answer)
       _gras_rpc_cancelled = xbt_dynar_new(sizeof(ctx), NULL);
     xbt_dynar_push(_gras_rpc_cancelled, &ctx);
     XBT_INFO
       _gras_rpc_cancelled = xbt_dynar_new(sizeof(ctx), NULL);
     xbt_dynar_push(_gras_rpc_cancelled, &ctx);
     XBT_INFO
-        ("canceled RPC %ld pushed onto the stack (%s from %s:%d) Reason: %s",
+        ("canceled RPC %lu pushed onto the stack (%s from %s:%d) Reason: %s",
          ctx->ID, ctx->msgtype->name,
          xbt_socket_peer_name(ctx->expeditor),
          xbt_socket_peer_port(ctx->expeditor), e.msg);
          ctx->ID, ctx->msgtype->name,
          xbt_socket_peer_name(ctx->expeditor),
          xbt_socket_peer_port(ctx->expeditor), e.msg);
@@ -185,7 +185,7 @@ void gras_msg_rpc_async_wait(gras_msg_cb_ctx_t ctx, void *answer)
     memcpy(&e, received.payl, received.payl_size);
     free(received.payl);
     XBT_VERB("Raise a remote exception cat:%d coming from %s (%s)",
     memcpy(&e, received.payl, received.payl_size);
     free(received.payl);
     XBT_VERB("Raise a remote exception cat:%d coming from %s (%s)",
-          e.category, e.host, e.msg);
+             (int)e.category, e.host, e.msg);
     __xbt_running_ctx_fetch()->exception.msg = e.msg;
     __xbt_running_ctx_fetch()->exception.category = e.category;
     __xbt_running_ctx_fetch()->exception.value = e.value;
     __xbt_running_ctx_fetch()->exception.msg = e.msg;
     __xbt_running_ctx_fetch()->exception.category = e.category;
     __xbt_running_ctx_fetch()->exception.value = e.value;
index 4f49dec..0471d13 100644 (file)
@@ -159,7 +159,7 @@ gras_msg_t gras_msg_recv_any(void)
               sock_data->rdv_client : sock_data->rdv_server);
     xbt_dynar_push(comms, &(sock_data->comm_recv));
   }
               sock_data->rdv_client : sock_data->rdv_server);
     xbt_dynar_push(comms, &(sock_data->comm_recv));
   }
-  XBT_VERB("Wait on %ld 'sockets'", xbt_dynar_length(comms));
+  XBT_VERB("Wait on %lu 'sockets'", xbt_dynar_length(comms));
   /* Wait for the end of any of these communications */
   got = simcall_comm_waitany(comms);
 
   /* Wait for the end of any of these communications */
   got = simcall_comm_waitany(comms);
 
index 7b025ca..79cc64a 100644 (file)
@@ -208,7 +208,7 @@ void gras_socket_close(xbt_socket_t sock)
     for (cursor = 0; cursor < xbt_dynar_length(sockets); cursor++) {
       _xbt_dynar_cursor_get(sockets, cursor, &sock_iter);
       if (sock == sock_iter) {
     for (cursor = 0; cursor < xbt_dynar_length(sockets); cursor++) {
       _xbt_dynar_cursor_get(sockets, cursor, &sock_iter);
       if (sock == sock_iter) {
-        XBT_DEBUG("remove sock cursor %d dize %lu\n", cursor,
+        XBT_DEBUG("remove sock cursor %u dize %lu\n", cursor,
                xbt_dynar_length(sockets));
         xbt_dynar_cursor_rm(sockets, &cursor);
         if (sock->plugin->socket_close)
                xbt_dynar_length(sockets));
         xbt_dynar_cursor_rm(sockets, &cursor);
         if (sock->plugin->socket_close)
index 29f64f0..0951ef7 100644 (file)
@@ -255,7 +255,7 @@ gras_trp_file_chunk_recv(xbt_socket_t sock,
     int status = 0;
 
     status = read(sock->sd, data + got, (long int) size);
     int status = 0;
 
     status = read(sock->sd, data + got, (long int) size);
-    XBT_DEBUG("read(%d, %p, %ld);", sock->sd, data + got, size);
+    XBT_DEBUG("read(%d, %p, %lu);", sock->sd, data + got, size);
 
     if (status < 0) {
       THROWF(system_error, 0, "read(%d,%p,%d) failed: %s",
 
     if (status < 0) {
       THROWF(system_error, 0, "read(%d,%p,%d) failed: %s",
index 277aea0..ebdc3d9 100644 (file)
@@ -266,7 +266,7 @@ void gras_trp_sg_socket_close(xbt_socket_t sock)
   if (sock->incoming && !sock->outgoing && sockdata->server_port >= 0) {
     /* server mode socket. Unregister it from 'OS' tables */
     xbt_dynar_foreach(hd->ports, cpt, pr) {
   if (sock->incoming && !sock->outgoing && sockdata->server_port >= 0) {
     /* server mode socket. Unregister it from 'OS' tables */
     xbt_dynar_foreach(hd->ports, cpt, pr) {
-      XBT_DEBUG("Check pr %d of %lu", cpt, xbt_dynar_length(hd->ports));
+      XBT_DEBUG("Check pr %u of %lu", cpt, xbt_dynar_length(hd->ports));
       if (pr->port == sockdata->server_port) {
         xbt_dynar_cursor_rm(hd->ports, &cpt);
         XBT_OUT();
       if (pr->port == sockdata->server_port) {
         xbt_dynar_cursor_rm(hd->ports, &cpt);
         XBT_OUT();
index 24c0f62..b2d442c 100644 (file)
@@ -134,14 +134,14 @@ void gras_procdata_init()
   xbt_dynar_foreach(_gras_procdata_fabrics, cursor, fab) {
 
     if (cursor + 1 <= xbt_set_length(pd->libdata)) {
   xbt_dynar_foreach(_gras_procdata_fabrics, cursor, fab) {
 
     if (cursor + 1 <= xbt_set_length(pd->libdata)) {
-      XBT_DEBUG("Skip fabric %d: there is already %ld libdata",
+      XBT_DEBUG("Skip fabric %u: there is already %lu libdata",
              cursor, xbt_set_length(pd->libdata));
       continue;                 /* allow to recall this function to get recently added fabrics */
     }
              cursor, xbt_set_length(pd->libdata));
       continue;                 /* allow to recall this function to get recently added fabrics */
     }
-    XBT_DEBUG("Go ahead for cursor %d, there is %ld libdata",
+    XBT_DEBUG("Go ahead for cursor %u, there is %lu libdata",
            cursor, xbt_set_length(pd->libdata));
 
            cursor, xbt_set_length(pd->libdata));
 
-    xbt_assert(fab.name, "Name of fabric #%d is NULL!", cursor);
+    xbt_assert(fab.name, "Name of fabric #%u is NULL!", cursor);
     XBT_DEBUG("Create the procdata for %s", fab.name);
     /* Check for our own errors */
 
     XBT_DEBUG("Create the procdata for %s", fab.name);
     /* Check for our own errors */
 
index ea7e0f5..1841604 100644 (file)
@@ -105,7 +105,7 @@ void gras_process_exit()
     unsigned int cpt;
     s_gras_msg_t msg;
     XBT_WARN
     unsigned int cpt;
     s_gras_msg_t msg;
     XBT_WARN
-        ("process %d terminated, but %ld messages are still queued. Message list:",
+        ("process %d terminated, but %lu messages are still queued. Message list:",
          gras_os_getpid(), xbt_dynar_length(msg_pd->msg_queue));
     xbt_dynar_foreach(msg_pd->msg_queue, cpt, msg) {
       XBT_WARN("   Message %s (%s) from %s@%s:%d", msg.type->name,
          gras_os_getpid(), xbt_dynar_length(msg_pd->msg_queue));
     xbt_dynar_foreach(msg_pd->msg_queue, cpt, msg) {
       XBT_WARN("   Message %s (%s) from %s@%s:%d", msg.type->name,
index dc1b77a..9ed804e 100644 (file)
@@ -68,7 +68,7 @@ MSG_error_t MSG_task_execute(m_task_t task)
 
   simdata->isused=0;
 
 
   simdata->isused=0;
 
-  XBT_DEBUG("Execution task '%s' finished in state %d", task->name, comp_state);
+  XBT_DEBUG("Execution task '%s' finished in state %d", task->name, (int)comp_state);
   if (comp_state == SIMIX_DONE) {
     /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */
     simdata->computation_amount = 0.0;
   if (comp_state == SIMIX_DONE) {
     /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */
     simdata->computation_amount = 0.0;
@@ -185,7 +185,7 @@ MSG_error_t MSG_parallel_task_execute(m_task_t task)
   comp_state = simcall_host_execution_wait(simdata->compute);
   p_simdata->waiting_action = NULL;
 
   comp_state = simcall_host_execution_wait(simdata->compute);
   p_simdata->waiting_action = NULL;
 
-  XBT_DEBUG("Finished waiting for execution of action %p, state = %d", simdata->compute, comp_state);
+  XBT_DEBUG("Finished waiting for execution of action %p, state = %d", simdata->compute, (int)comp_state);
 
   simdata->isused=0;
 
 
   simdata->isused=0;
 
index ef0b9ee..c44a719 100644 (file)
@@ -258,7 +258,7 @@ static void dump_res()
   unsigned int cursor;
   SD_task_t task;
   xbt_dynar_foreach(result, cursor, task) {
   unsigned int cursor;
   SD_task_t task;
   xbt_dynar_foreach(result, cursor, task) {
-    XBT_INFO("Task %d", cursor);
+    XBT_INFO("Task %u", cursor);
     SD_task_dump(task);
   }
 }
     SD_task_dump(task);
   }
 }
index 9109ff9..038d46e 100644 (file)
@@ -372,7 +372,7 @@ void SD_task_dump(SD_task_t task)
     }
   }
   XBT_INFO("  - amount: %.0f", SD_task_get_amount(task));
     }
   }
   XBT_INFO("  - amount: %.0f", SD_task_get_amount(task));
-  XBT_INFO("  - Dependencies to satisfy: %d", task->unsatisfied_dependencies);
+  XBT_INFO("  - Dependencies to satisfy: %u", task->unsatisfied_dependencies);
   if (!xbt_dynar_is_empty(task->tasks_before)) {
     XBT_INFO("  - pre-dependencies:");
     xbt_dynar_foreach(task->tasks_before, counter, dependency) {
   if (!xbt_dynar_is_empty(task->tasks_before)) {
     XBT_INFO("  - pre-dependencies:");
     xbt_dynar_foreach(task->tasks_before, counter, dependency) {
@@ -877,7 +877,7 @@ void __SD_task_really_run(SD_task_t task)
 
   xbt_assert(__SD_task_is_runnable_or_in_fifo(task),
               "Task '%s' is not runnable or in a fifo! Task state: %d",
 
   xbt_assert(__SD_task_is_runnable_or_in_fifo(task),
               "Task '%s' is not runnable or in a fifo! Task state: %d",
-              SD_task_get_name(task), SD_task_get_state(task));
+             SD_task_get_name(task), (int)SD_task_get_state(task));
   xbt_assert(task->workstation_list != NULL,
               "Task '%s': workstation_list is NULL!",
               SD_task_get_name(task));
   xbt_assert(task->workstation_list != NULL,
               "Task '%s': workstation_list is NULL!",
               SD_task_get_name(task));
@@ -979,7 +979,7 @@ void __SD_task_really_run(SD_task_t task)
   __SD_task_destroy_scheduling_data(task);      /* now the scheduling data are not useful anymore */
   __SD_task_set_state(task, SD_RUNNING);
   xbt_assert(__SD_task_is_running(task), "Bad state of task '%s': %d",
   __SD_task_destroy_scheduling_data(task);      /* now the scheduling data are not useful anymore */
   __SD_task_set_state(task, SD_RUNNING);
   xbt_assert(__SD_task_is_running(task), "Bad state of task '%s': %d",
-              SD_task_get_name(task), SD_task_get_state(task));
+             SD_task_get_name(task), (int)SD_task_get_state(task));
 
 }
 
 
 }
 
@@ -998,7 +998,7 @@ int __SD_task_try_to_run(SD_task_t task)
 
   xbt_assert(__SD_task_is_runnable(task),
               "Task '%s' is not runnable! Task state: %d",
 
   xbt_assert(__SD_task_is_runnable(task),
               "Task '%s' is not runnable! Task state: %d",
-              SD_task_get_name(task), SD_task_get_state(task));
+             SD_task_get_name(task), (int)SD_task_get_state(task));
 
 
   for (i = 0; i < task->workstation_nb; i++) {
 
 
   for (i = 0; i < task->workstation_nb; i++) {
@@ -1020,7 +1020,7 @@ int __SD_task_try_to_run(SD_task_t task)
     }
     __SD_task_set_state(task, SD_IN_FIFO);
     xbt_assert(__SD_task_is_in_fifo(task), "Bad state of task '%s': %d",
     }
     __SD_task_set_state(task, SD_IN_FIFO);
     xbt_assert(__SD_task_is_in_fifo(task), "Bad state of task '%s': %d",
-                SD_task_get_name(task), SD_task_get_state(task));
+               SD_task_get_name(task), (int)SD_task_get_state(task));
     XBT_DEBUG("Task '%s' state is now SD_IN_FIFO", SD_task_get_name(task));
   } else {
     __SD_task_really_run(task);
     XBT_DEBUG("Task '%s' state is now SD_IN_FIFO", SD_task_get_name(task));
   } else {
     __SD_task_really_run(task);
@@ -1046,7 +1046,7 @@ void __SD_task_just_done(SD_task_t task)
 
   xbt_assert(__SD_task_is_running(task),
               "The task must be running! Task state: %d",
 
   xbt_assert(__SD_task_is_running(task),
               "The task must be running! Task state: %d",
-              SD_task_get_state(task));
+              (int)SD_task_get_state(task));
   xbt_assert(task->workstation_list != NULL,
               "Task '%s': workstation_list is NULL!",
               SD_task_get_name(task));
   xbt_assert(task->workstation_list != NULL,
               "Task '%s': workstation_list is NULL!",
               SD_task_get_name(task));
@@ -1065,7 +1065,7 @@ void __SD_task_just_done(SD_task_t task)
   for (i = 0; i < task->workstation_nb; i++) {
     workstation = task->workstation_list[i];
     XBT_DEBUG("Workstation '%s': access_mode = %d",
   for (i = 0; i < task->workstation_nb; i++) {
     workstation = task->workstation_list[i];
     XBT_DEBUG("Workstation '%s': access_mode = %d",
-           SD_workstation_get_name(workstation), workstation->access_mode);
+              SD_workstation_get_name(workstation), (int)workstation->access_mode);
     if (workstation->access_mode == SD_WORKSTATION_SEQUENTIAL_ACCESS) {
       xbt_assert(workstation->task_fifo != NULL,
                   "Workstation '%s' has sequential access but no fifo!",
     if (workstation->access_mode == SD_WORKSTATION_SEQUENTIAL_ACCESS) {
       xbt_assert(workstation->task_fifo != NULL,
                   "Workstation '%s' has sequential access but no fifo!",
@@ -1088,7 +1088,7 @@ void __SD_task_just_done(SD_task_t task)
         xbt_assert(__SD_task_is_in_fifo(candidate),
                     "Bad state of candidate '%s': %d",
                     SD_task_get_name(candidate),
         xbt_assert(__SD_task_is_in_fifo(candidate),
                     "Bad state of candidate '%s': %d",
                     SD_task_get_name(candidate),
-                    SD_task_get_state(candidate));
+                    (int)SD_task_get_state(candidate));
       }
 
       XBT_DEBUG("Candidate in fifo: %p", candidate);
       }
 
       XBT_DEBUG("Candidate in fifo: %p", candidate);
@@ -1127,7 +1127,7 @@ void __SD_task_just_done(SD_task_t task)
 
     xbt_assert(__SD_task_is_in_fifo(candidate),
                 "Bad state of candidate '%s': %d",
 
     xbt_assert(__SD_task_is_in_fifo(candidate),
                 "Bad state of candidate '%s': %d",
-                SD_task_get_name(candidate), SD_task_get_state(candidate));
+               SD_task_get_name(candidate), (int)SD_task_get_state(candidate));
 
     for (j = 0; j < candidate->workstation_nb && can_start; j++) {
       workstation = candidate->workstation_list[j];
 
     for (j = 0; j < candidate->workstation_nb && can_start; j++) {
       workstation = candidate->workstation_list[j];
@@ -1161,7 +1161,7 @@ void __SD_task_just_done(SD_task_t task)
 
       /* finally execute the task */
       XBT_DEBUG("Task '%s' state: %d", SD_task_get_name(candidate),
 
       /* finally execute the task */
       XBT_DEBUG("Task '%s' state: %d", SD_task_get_name(candidate),
-             SD_task_get_state(candidate));
+             (int)SD_task_get_state(candidate));
       __SD_task_really_run(candidate);
 
       XBT_DEBUG
       __SD_task_really_run(candidate);
 
       XBT_DEBUG
@@ -1171,7 +1171,7 @@ void __SD_task_just_done(SD_task_t task)
       xbt_assert(__SD_task_is_running(candidate),
                   "Bad state of task '%s': %d",
                   SD_task_get_name(candidate),
       xbt_assert(__SD_task_is_running(candidate),
                   "Bad state of task '%s': %d",
                   SD_task_get_name(candidate),
-                  SD_task_get_state(candidate));
+                 (int)SD_task_get_state(candidate));
       XBT_DEBUG("Okay, the task is running.");
 
     }                           /* can start */
       XBT_DEBUG("Okay, the task is running.");
 
     }                           /* can start */
index 3d6682d..913abb2 100644 (file)
@@ -358,13 +358,13 @@ void SIMIX_display_process_status(void)
          action_description = "I/O";
          break;
       }
          action_description = "I/O";
          break;
       }
-      XBT_INFO("Process %ld (%s@%s): waiting for %s action %p (%s) in state %d to finish",
+      XBT_INFO("Process %lu (%s@%s): waiting for %s action %p (%s) in state %d to finish",
           process->pid, process->name, process->smx_host->name,
          action_description, process->waiting_action,
           process->pid, process->name, process->smx_host->name,
          action_description, process->waiting_action,
-         process->waiting_action->name, process->waiting_action->state);
+          process->waiting_action->name, (int)process->waiting_action->state);
     }
     else {
     }
     else {
-      XBT_INFO("Process %ld (%s@%s)", process->pid, process->name, process->smx_host->name);
+      XBT_INFO("Process %lu (%s@%s)", process->pid, process->name, process->smx_host->name);
     }
   }
 }
     }
   }
 }
index 01a4de8..08b7ebe 100644 (file)
@@ -299,7 +299,7 @@ void SIMIX_pre_host_execution_wait(smx_simcall_t simcall)
 {
   smx_action_t action = simcall->host_execution_wait.execution;
 
 {
   smx_action_t action = simcall->host_execution_wait.execution;
 
-  XBT_DEBUG("Wait for execution of action %p, state %d", action, action->state);
+  XBT_DEBUG("Wait for execution of action %p, state %d", action, (int)action->state);
 
   /* Associate this simcall to the action */
   xbt_fifo_push(action->simcalls, simcall);
 
   /* Associate this simcall to the action */
   xbt_fifo_push(action->simcalls, simcall);
@@ -355,7 +355,7 @@ void SIMIX_execution_finish(smx_action_t action)
 
       default:
         xbt_die("Internal error in SIMIX_execution_finish: unexpected action state %d",
 
       default:
         xbt_die("Internal error in SIMIX_execution_finish: unexpected action state %d",
-            action->state);
+            (int)action->state);
     }
     simcall->issuer->waiting_action = NULL;
     simcall->host_execution_wait.result = action->state;
     }
     simcall->issuer->waiting_action = NULL;
     simcall->host_execution_wait.result = action->state;
index 60fe284..df706e6 100644 (file)
@@ -258,7 +258,7 @@ void SIMIX_io_finish(smx_action_t action)
 
       default:
         xbt_die("Internal error in SIMIX_io_finish: unexpected action state %d",
 
       default:
         xbt_die("Internal error in SIMIX_io_finish: unexpected action state %d",
-            action->state);
+            (int)action->state);
     }
     simcall->issuer->waiting_action = NULL;
     SIMIX_simcall_answer(simcall);
     }
     simcall->issuer->waiting_action = NULL;
     SIMIX_simcall_answer(simcall);
index 74cefad..db18929 100644 (file)
@@ -154,7 +154,7 @@ smx_action_t SIMIX_rdv_get_comm(smx_rdv_t rdv, e_smx_comm_type_t type,
     }
     XBT_DEBUG("Sorry, communication action %p does not match our needs:"
            " its type is %d but we are looking for a comm of type %d",
     }
     XBT_DEBUG("Sorry, communication action %p does not match our needs:"
            " its type is %d but we are looking for a comm of type %d",
-           action, action->comm.type, type);
+           action, (int)action->comm.type, (int)type);
   }
   XBT_DEBUG("No matching communication action found");
   return NULL;
   }
   XBT_DEBUG("No matching communication action found");
   return NULL;
@@ -247,7 +247,7 @@ smx_action_t SIMIX_comm_new(e_smx_comm_type_t type)
 void SIMIX_comm_destroy(smx_action_t action)
 {
   XBT_DEBUG("Destroy action %p (refcount: %d), state: %d",
 void SIMIX_comm_destroy(smx_action_t action)
 {
   XBT_DEBUG("Destroy action %p (refcount: %d), state: %d",
-      action, action->comm.refcount, action->state);
+            action, action->comm.refcount, (int)action->state);
 
   if (action->comm.refcount <= 0) {
        xbt_backtrace_display_current();
 
   if (action->comm.refcount <= 0) {
        xbt_backtrace_display_current();
@@ -588,7 +588,7 @@ void SIMIX_comm_finish(smx_action_t action)
     if (action->comm.rdv)
       SIMIX_rdv_remove(action->comm.rdv, action);
 
     if (action->comm.rdv)
       SIMIX_rdv_remove(action->comm.rdv, action);
 
-    XBT_DEBUG("SIMIX_comm_finish: action state = %d", action->state);
+    XBT_DEBUG("SIMIX_comm_finish: action state = %d", (int)action->state);
 
     /* Check out for errors */
     switch (action->state) {
 
     /* Check out for errors */
     switch (action->state) {
@@ -648,7 +648,7 @@ void SIMIX_comm_finish(smx_action_t action)
         break;
 
       default:
         break;
 
       default:
-        xbt_die("Unexpected action state in SIMIX_comm_finish: %d", action->state);
+        xbt_die("Unexpected action state in SIMIX_comm_finish: %d", (int)action->state);
     }
 
     /* if there is an exception during a waitany or a testany, indicate the position of the failed communication */
     }
 
     /* if there is an exception during a waitany or a testany, indicate the position of the failed communication */
@@ -698,7 +698,7 @@ void SIMIX_post_comm(smx_action_t action)
     action->state = SIMIX_DONE;
 
   XBT_DEBUG("SIMIX_post_comm: comm %p, state %d, src_proc %p, dst_proc %p, detached: %d",
     action->state = SIMIX_DONE;
 
   XBT_DEBUG("SIMIX_post_comm: comm %p, state %d, src_proc %p, dst_proc %p, detached: %d",
-      action, action->state, action->comm.src_proc, action->comm.dst_proc, action->comm.detached);
+      action, (int)action->state, action->comm.src_proc, action->comm.dst_proc, action->comm.detached);
 
   /* destroy the surf actions associated with the Simix communication */
   SIMIX_comm_destroy_internal_actions(action);
 
   /* destroy the surf actions associated with the Simix communication */
   SIMIX_comm_destroy_internal_actions(action);
index d2228e9..e830985 100644 (file)
@@ -56,7 +56,7 @@ void SIMIX_process_cleanup(smx_process_t process)
 
     if (action->comm.src_proc == process) {
       XBT_DEBUG("Found an unfinished send comm %p (detached = %d), state %d, src = %p, dst = %p",
 
     if (action->comm.src_proc == process) {
       XBT_DEBUG("Found an unfinished send comm %p (detached = %d), state %d, src = %p, dst = %p",
-          action, action->comm.detached, action->state, action->comm.src_proc, action->comm.dst_proc);
+          action, action->comm.detached, (int)action->state, action->comm.src_proc, action->comm.dst_proc);
       action->comm.src_proc = NULL;
 
       if (action->comm.detached) {
       action->comm.src_proc = NULL;
 
       if (action->comm.detached) {
@@ -76,7 +76,7 @@ void SIMIX_process_cleanup(smx_process_t process)
     }
     else if (action->comm.dst_proc == process){
       XBT_DEBUG("Found an unfinished recv comm %p, state %d, src = %p, dst = %p",
     }
     else if (action->comm.dst_proc == process){
       XBT_DEBUG("Found an unfinished recv comm %p, state %d, src = %p, dst = %p",
-          action, action->state, action->comm.src_proc, action->comm.dst_proc);
+          action, (int)action->state, action->comm.src_proc, action->comm.dst_proc);
       action->comm.dst_proc = NULL;
 
       if (action->comm.detached && action->comm.refcount == 1
       action->comm.dst_proc = NULL;
 
       if (action->comm.detached && action->comm.refcount == 1
@@ -370,7 +370,7 @@ void SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
 
         default:
           xbt_die("Internal error in SIMIX_process_suspend: unexpected action type %d",
 
         default:
           xbt_die("Internal error in SIMIX_process_suspend: unexpected action type %d",
-              process->waiting_action->type);
+              (int)process->waiting_action->type);
       }
     }
   }
       }
     }
   }
@@ -410,7 +410,7 @@ void SIMIX_process_resume(smx_process_t process, smx_process_t issuer)
 
         default:
           xbt_die("Internal error in SIMIX_process_resume: unexpected action type %d",
 
         default:
           xbt_die("Internal error in SIMIX_process_resume: unexpected action type %d",
-              process->waiting_action->type);
+              (int)process->waiting_action->type);
       }
     }
     else {
       }
     }
     else {
index 56863f8..4e7c79d 100644 (file)
@@ -20,7 +20,7 @@ void SIMIX_simcall_push(smx_process_t self)
 {
   if (self != simix_global->maestro_process) {
     XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
 {
   if (self != simix_global->maestro_process) {
     XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
-        SIMIX_simcall_name(self->simcall.call), self->simcall.call);
+              SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
     SIMIX_process_yield(self);
   } else {
     SIMIX_simcall_pre(&self->simcall, 0);
     SIMIX_process_yield(self);
   } else {
     SIMIX_simcall_pre(&self->simcall, 0);
@@ -30,7 +30,7 @@ void SIMIX_simcall_push(smx_process_t self)
 void SIMIX_simcall_answer(smx_simcall_t simcall)
 {
   if (simcall->issuer != simix_global->maestro_process){
 void SIMIX_simcall_answer(smx_simcall_t simcall)
 {
   if (simcall->issuer != simix_global->maestro_process){
-    XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall->call), simcall->call,
+    XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall->call), (int)simcall->call,
         simcall->issuer->name, simcall->issuer);
     simcall->issuer->simcall.call = SIMCALL_NONE;
     xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, simcall->issuer);
         simcall->issuer->name, simcall->issuer);
     simcall->issuer->simcall.call = SIMCALL_NONE;
     xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, simcall->issuer);
index d09b416..c9af7b9 100644 (file)
@@ -392,7 +392,7 @@ void SIMIX_cond_destroy(smx_cond_t cond)
 /** @brief Initialize a semaphore */
 smx_sem_t SIMIX_sem_init(unsigned int value)
 {
 /** @brief Initialize a semaphore */
 smx_sem_t SIMIX_sem_init(unsigned int value)
 {
-  XBT_IN("(%d)",value);
+  XBT_IN("(%u)",value);
   s_smx_process_t p;
 
   smx_sem_t sem = xbt_new0(s_smx_sem_t, 1);
   s_smx_process_t p;
 
   smx_sem_t sem = xbt_new0(s_smx_sem_t, 1);
index 23b3dfc..2b65a73 100644 (file)
@@ -213,7 +213,7 @@ xbt_cfg_register(xbt_cfg_t * cfg,
     *cfg = xbt_cfg_new();
   xbt_assert(type >= xbt_cfgelm_int && type <= xbt_cfgelm_peer,
               "type of %s not valid (%d should be between %d and %d)",
     *cfg = xbt_cfg_new();
   xbt_assert(type >= xbt_cfgelm_int && type <= xbt_cfgelm_peer,
               "type of %s not valid (%d should be between %d and %d)",
-              name, type, xbt_cfgelm_int, xbt_cfgelm_peer);
+             name, (int)type, xbt_cfgelm_int, xbt_cfgelm_peer);
   res = xbt_dict_get_or_null((xbt_dict_t) * cfg, name);
 
   if (res) {
   res = xbt_dict_get_or_null((xbt_dict_t) * cfg, name);
 
   if (res) {
@@ -223,7 +223,7 @@ xbt_cfg_register(xbt_cfg_t * cfg,
 
   res = xbt_new(s_xbt_cfgelm_t, 1);
   XBT_DEBUG("Register cfg elm %s (%s) (%d to %d %s (=%d) @%p in set %p)",
 
   res = xbt_new(s_xbt_cfgelm_t, 1);
   XBT_DEBUG("Register cfg elm %s (%s) (%d to %d %s (=%d) @%p in set %p)",
-         name, desc, min, max, xbt_cfgelm_type_name[type], type, res,
+            name, desc, min, max, xbt_cfgelm_type_name[type], (int)type, res,
          *cfg);
 
   res->desc = xbt_strdup(desc);
          *cfg);
 
   res->desc = xbt_strdup(desc);
@@ -260,7 +260,7 @@ xbt_cfg_register(xbt_cfg_t * cfg,
     break;
 
   default:
     break;
 
   default:
-    XBT_ERROR("%d is an invalide type code", type);
+    XBT_ERROR("%d is an invalide type code", (int)type);
   }
 
   xbt_dict_set((xbt_dict_t) * cfg, name, res, NULL);
   }
 
   xbt_dict_set((xbt_dict_t) * cfg, name, res, NULL);
@@ -490,7 +490,7 @@ e_xbt_cfgelm_type_t xbt_cfg_get_type(xbt_cfg_t cfg, const char *name)
            "Can't get the type of '%s' since this variable does not exist",
            name);
 
            "Can't get the type of '%s' since this variable does not exist",
            name);
 
-  XBT_INFO("type in variable = %d", variable->type);
+  XBT_INFO("type in variable = %d", (int)variable->type);
 
   return variable->type;
 }
 
   return variable->type;
 }
@@ -549,7 +549,7 @@ void xbt_cfg_set_vargs(xbt_cfg_t cfg, const char *name, va_list pa)
     break;
 
   default:
     break;
 
   default:
-    xbt_die("Config element variable %s not valid (type=%d)", name, type);
+    xbt_die("Config element variable %s not valid (type=%d)", name, (int)type);
   }
 }
 
   }
 }
 
@@ -899,7 +899,7 @@ void xbt_cfg_set_string(xbt_cfg_t cfg, const char *name, const char *val)
   variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_string);
   XBT_DEBUG("Variable: %d to %d %s (=%d) @%p",
          variable->min, variable->max,
   variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_string);
   XBT_DEBUG("Variable: %d to %d %s (=%d) @%p",
          variable->min, variable->max,
-         xbt_cfgelm_type_name[variable->type], variable->type, variable);
+            xbt_cfgelm_type_name[variable->type], (int)variable->type, variable);
 
   if (variable->max == 1) {
     if (!xbt_dynar_is_empty(variable->content)) {
 
   if (variable->max == 1) {
     if (!xbt_dynar_is_empty(variable->content)) {
index b397268..2810ac3 100644 (file)
@@ -378,7 +378,7 @@ void xbt_datadesc_cb_push_uint_mult(xbt_datadesc_type_t ignored,
   unsigned int old = *(unsigned int *) data;
   unsigned int new = xbt_cbps_i_pop(vars);
 
   unsigned int old = *(unsigned int *) data;
   unsigned int new = xbt_cbps_i_pop(vars);
 
-  XBT_DEBUG("push %d x %d as a size", old, new);
+  XBT_DEBUG("push %u x %u as a size", old, new);
   xbt_cbps_i_push(vars, (int) (old * new));
 }
 
   xbt_cbps_i_push(vars, (int) (old * new));
 }
 
@@ -400,6 +400,6 @@ void xbt_datadesc_cb_push_ulint_mult(xbt_datadesc_type_t ignored,
   unsigned long int old = *(unsigned long int *) data;
   unsigned long int new = xbt_cbps_i_pop(vars);
 
   unsigned long int old = *(unsigned long int *) data;
   unsigned long int new = xbt_cbps_i_pop(vars);
 
-  XBT_DEBUG("push %ld x %ld as a size", old, new);
+  XBT_DEBUG("push %lu x %lu as a size", old, new);
   xbt_cbps_i_push(vars, (int) (old * new));
 }
   xbt_cbps_i_push(vars, (int) (old * new));
 }
index 6942b24..8c2328f 100644 (file)
@@ -227,7 +227,7 @@ void xbt_datadesc_type_dump(const xbt_datadesc_type_t ddt)
 
   printf("  alignment[");
   for (cpt = 0; cpt < xbt_arch_count; cpt++) {
 
   printf("  alignment[");
   for (cpt = 0; cpt < xbt_arch_count; cpt++) {
-    printf("%s%s%ld%s",
+    printf("%s%s%lu%s",
            cpt > 0 ? ", " : "",
            cpt == GRAS_THISARCH ? ">" : "",
            ddt->alignment[cpt], cpt == GRAS_THISARCH ? "<" : "");
            cpt > 0 ? ", " : "",
            cpt == GRAS_THISARCH ? ">" : "",
            ddt->alignment[cpt], cpt == GRAS_THISARCH ? "<" : "");
@@ -236,7 +236,7 @@ void xbt_datadesc_type_dump(const xbt_datadesc_type_t ddt)
 
   printf("  aligned_size[");
   for (cpt = 0; cpt < xbt_arch_count; cpt++) {
 
   printf("  aligned_size[");
   for (cpt = 0; cpt < xbt_arch_count; cpt++) {
-    printf("%s%s%ld%s",
+    printf("%s%s%lu%s",
            cpt > 0 ? ", " : "",
            cpt == GRAS_THISARCH ? ">" : "",
            ddt->aligned_size[cpt], cpt == GRAS_THISARCH ? "<" : "");
            cpt > 0 ? ", " : "",
            cpt == GRAS_THISARCH ? ">" : "",
            ddt->aligned_size[cpt], cpt == GRAS_THISARCH ? "<" : "");
@@ -248,10 +248,10 @@ void xbt_datadesc_type_dump(const xbt_datadesc_type_t ddt)
 
     struct_data = ddt->category.struct_data;
     xbt_dynar_foreach(struct_data.fields, cpt, field) {
 
     struct_data = ddt->category.struct_data;
     xbt_dynar_foreach(struct_data.fields, cpt, field) {
-      printf(">>> Dump field #%d (%s) (offset=%ld)\n",
+      printf(">>> Dump field #%u (%s) (offset=%ld)\n",
              cpt, field->name, field->offset[GRAS_THISARCH]);
       xbt_datadesc_type_dump(field->type);
              cpt, field->name, field->offset[GRAS_THISARCH]);
       xbt_datadesc_type_dump(field->type);
-      printf("<<< end dump field #%d (%s)\n", cpt, field->name);
+      printf("<<< end dump field #%u (%s)\n", cpt, field->name);
     }
   }
   fflush(stdout);
     }
   }
   fflush(stdout);
index 7d2b028..ba295af 100644 (file)
@@ -224,7 +224,7 @@ xbt_datadesc_struct_append(xbt_datadesc_type_t struct_type,
   field->name = (char *) strdup(name);
 
   XBT_DEBUG("----------------");
   field->name = (char *) strdup(name);
 
   XBT_DEBUG("----------------");
-  XBT_DEBUG("PRE s={size=%ld,align=%ld,asize=%ld}",
+  XBT_DEBUG("PRE s={size=%ld,align=%lu,asize=%lu}",
          struct_type->size[GRAS_THISARCH],
          struct_type->alignment[GRAS_THISARCH],
          struct_type->aligned_size[GRAS_THISARCH]);
          struct_type->size[GRAS_THISARCH],
          struct_type->alignment[GRAS_THISARCH],
          struct_type->aligned_size[GRAS_THISARCH]);
@@ -250,11 +250,11 @@ xbt_datadesc_struct_append(xbt_datadesc_type_t struct_type,
   XBT_DEBUG("Push a %s into %s at offset %ld.",
          field_type->name, struct_type->name,
          field->offset[GRAS_THISARCH]);
   XBT_DEBUG("Push a %s into %s at offset %ld.",
          field_type->name, struct_type->name,
          field->offset[GRAS_THISARCH]);
-  XBT_DEBUG("  f={size=%ld,align=%ld,asize=%ld}",
+  XBT_DEBUG("  f={size=%ld,align=%lu,asize=%lu}",
          field_type->size[GRAS_THISARCH],
          field_type->alignment[GRAS_THISARCH],
          field_type->aligned_size[GRAS_THISARCH]);
          field_type->size[GRAS_THISARCH],
          field_type->alignment[GRAS_THISARCH],
          field_type->aligned_size[GRAS_THISARCH]);
-  XBT_DEBUG("  s={size=%ld,align=%ld,asize=%ld}",
+  XBT_DEBUG("  s={size=%ld,align=%lu,asize=%lu}",
          struct_type->size[GRAS_THISARCH],
          struct_type->alignment[GRAS_THISARCH],
          struct_type->aligned_size[GRAS_THISARCH]);
          struct_type->size[GRAS_THISARCH],
          struct_type->alignment[GRAS_THISARCH],
          struct_type->aligned_size[GRAS_THISARCH]);
@@ -273,7 +273,7 @@ void xbt_datadesc_struct_close(xbt_datadesc_type_t struct_type)
   for (arch = 0; arch < xbt_arch_count; arch++) {
     struct_type->size[arch] = struct_type->aligned_size[arch];
   }
   for (arch = 0; arch < xbt_arch_count; arch++) {
     struct_type->size[arch] = struct_type->aligned_size[arch];
   }
-  XBT_DEBUG("structure %s closed. size=%ld,align=%ld,asize=%ld",
+  XBT_DEBUG("structure %s closed. size=%ld,align=%lu,asize=%lu",
          struct_type->name,
          struct_type->size[GRAS_THISARCH],
          struct_type->alignment[GRAS_THISARCH],
          struct_type->name,
          struct_type->size[GRAS_THISARCH],
          struct_type->alignment[GRAS_THISARCH],
@@ -1012,7 +1012,7 @@ int xbt_datadesc_type_cmp(const xbt_datadesc_type_t d1,
     }
 
     if (d1->alignment[cpt] != d2->alignment[cpt]) {
     }
 
     if (d1->alignment[cpt] != d2->alignment[cpt]) {
-      XBT_DEBUG("ddt_cmp: %s->alignment=%ld  !=  %s->alignment=%ld (on %s)",
+      XBT_DEBUG("ddt_cmp: %s->alignment=%lu  !=  %s->alignment=%lu (on %s)",
              d1->name, d1->alignment[cpt], d2->name, d2->alignment[cpt],
              xbt_arches[cpt].name);
       return d1->alignment[cpt] > d2->alignment[cpt] ? 1 : -1;
              d1->name, d1->alignment[cpt], d2->name, d2->alignment[cpt],
              xbt_arches[cpt].name);
       return d1->alignment[cpt] > d2->alignment[cpt] ? 1 : -1;
@@ -1020,7 +1020,7 @@ int xbt_datadesc_type_cmp(const xbt_datadesc_type_t d1,
 
     if (d1->aligned_size[cpt] != d2->aligned_size[cpt]) {
       XBT_DEBUG
 
     if (d1->aligned_size[cpt] != d2->aligned_size[cpt]) {
       XBT_DEBUG
-          ("ddt_cmp: %s->aligned_size=%ld  !=  %s->aligned_size=%ld (on %s)",
+          ("ddt_cmp: %s->aligned_size=%lu  !=  %s->aligned_size=%lu (on %s)",
            d1->name, d1->aligned_size[cpt], d2->name,
            d2->aligned_size[cpt], xbt_arches[cpt].name);
       return d1->aligned_size[cpt] > d2->aligned_size[cpt] ? 1 : -1;
            d1->name, d1->aligned_size[cpt], d2->name,
            d2->aligned_size[cpt], xbt_arches[cpt].name);
       return d1->aligned_size[cpt] > d2->aligned_size[cpt] ? 1 : -1;
@@ -1073,7 +1073,7 @@ int xbt_datadesc_type_cmp(const xbt_datadesc_type_t d1,
       field_desc_2 = field2->type;
       ret = xbt_datadesc_type_cmp(field_desc_1, field_desc_2);
       if (ret) {
       field_desc_2 = field2->type;
       ret = xbt_datadesc_type_cmp(field_desc_1, field_desc_2);
       if (ret) {
-        XBT_DEBUG("%s->field[%d]=%s != %s->field[%d]=%s",
+        XBT_DEBUG("%s->field[%u]=%s != %s->field[%u]=%s",
                d1->name, cpt, field1->name, d2->name, cpt, field2->name);
         return ret;
       }
                d1->name, cpt, field1->name, d2->name, cpt, field2->name);
         return ret;
       }
index 1a23b84..b9fdb29 100644 (file)
@@ -30,7 +30,7 @@ xbt_dd_send_int(xbt_socket_t sock, int *i, int stable)
     xbt_assert(int_type);
   }
 
     xbt_assert(int_type);
   }
 
-  XBT_DEBUG("send_int(%u)", *i);
+  XBT_DEBUG("send_int(%d)", *i);
   xbt_trp_send(sock, (char *) i, int_type->size[GRAS_THISARCH], stable);
 }
 
   xbt_trp_send(sock, (char *) i, int_type->size[GRAS_THISARCH], stable);
 }
 
@@ -55,7 +55,7 @@ xbt_dd_recv_int(xbt_socket_t sock, int r_arch, int *i)
       xbt_dd_convert_elm(int_type, 1, r_arch, ptr, i);
     free(ptr);
   }
       xbt_dd_convert_elm(int_type, 1, r_arch, ptr, i);
     free(ptr);
   }
-  XBT_DEBUG("recv_int(%u)", *i);
+  XBT_DEBUG("recv_int(%d)", *i);
 }
 
 /*
 }
 
 /*
@@ -157,7 +157,7 @@ xbt_datadesc_memcpy_rec(xbt_cbps_t state,
 
         if (XBT_LOG_ISENABLED(xbt_ddt_exchange, xbt_log_priority_verbose)) {
           if (sub_type == xbt_datadesc_by_name("unsigned int")) {
 
         if (XBT_LOG_ISENABLED(xbt_ddt_exchange, xbt_log_priority_verbose)) {
           if (sub_type == xbt_datadesc_by_name("unsigned int")) {
-            XBT_VERB("Copied value for field '%s': %d (type: unsigned int)",
+            XBT_VERB("Copied value for field '%s': %u (type: unsigned int)",
                   field->name, *(unsigned int *) field_dst);
           } else if (sub_type == xbt_datadesc_by_name("int")) {
             XBT_VERB("Copied value for field '%s': %d (type: int)",
                   field->name, *(unsigned int *) field_dst);
           } else if (sub_type == xbt_datadesc_by_name("int")) {
             XBT_VERB("Copied value for field '%s': %d (type: int)",
@@ -166,7 +166,7 @@ xbt_datadesc_memcpy_rec(xbt_cbps_t state,
           } else if (sub_type ==
                      xbt_datadesc_by_name("unsigned long int")) {
             XBT_VERB
           } else if (sub_type ==
                      xbt_datadesc_by_name("unsigned long int")) {
             XBT_VERB
-                ("Copied value for field '%s': %ld (type: unsigned long int)",
+                ("Copied value for field '%s': %lu (type: unsigned long int)",
                  field->name, *(unsigned long int *) field_dst);
           } else if (sub_type == xbt_datadesc_by_name("long int")) {
             XBT_VERB("Copied value for field '%s': %ld (type: long int)",
                  field->name, *(unsigned long int *) field_dst);
           } else if (sub_type == xbt_datadesc_by_name("long int")) {
             XBT_VERB("Copied value for field '%s': %ld (type: long int)",
@@ -205,7 +205,7 @@ xbt_datadesc_memcpy_rec(xbt_cbps_t state,
                   type->name);
 
       xbt_assert(field_num < xbt_dynar_length(union_data.fields),
                   type->name);
 
       xbt_assert(field_num < xbt_dynar_length(union_data.fields),
-                  "union field selector of %s returned %d but there is only %lu fields",
+                  "union field selector of %s returned %u but there is only %lu fields",
                   type->name, field_num,
                   xbt_dynar_length(union_data.fields));
 
                   type->name, field_num,
                   xbt_dynar_length(union_data.fields));
 
@@ -330,7 +330,7 @@ xbt_datadesc_memcpy_rec(xbt_cbps_t state,
       sub_type = array_data.type;
       elm_size = sub_type->aligned_size[GRAS_THISARCH];
       if (sub_type->category_code == e_xbt_datadesc_type_cat_scalar) {
       sub_type = array_data.type;
       elm_size = sub_type->aligned_size[GRAS_THISARCH];
       if (sub_type->category_code == e_xbt_datadesc_type_cat_scalar) {
-        XBT_VERB("Array of %ld scalars, copy it in one shot", array_count);
+        XBT_VERB("Array of %lu scalars, copy it in one shot", array_count);
         memcpy(dst, src,
                sub_type->aligned_size[GRAS_THISARCH] * array_count);
         count += sub_type->aligned_size[GRAS_THISARCH] * array_count;
         memcpy(dst, src,
                sub_type->aligned_size[GRAS_THISARCH] * array_count);
         count += sub_type->aligned_size[GRAS_THISARCH] * array_count;
@@ -339,7 +339,7 @@ xbt_datadesc_memcpy_rec(xbt_cbps_t state,
                  && sub_type->category.array_data.type->category_code ==
                  e_xbt_datadesc_type_cat_scalar) {
 
                  && sub_type->category.array_data.type->category_code ==
                  e_xbt_datadesc_type_cat_scalar) {
 
-        XBT_VERB("Array of %ld fixed array of scalars, copy it in one shot",
+        XBT_VERB("Array of %lu fixed array of scalars, copy it in one shot",
               array_count);
         memcpy(dst, src,
                sub_type->category.array_data.
               array_count);
         memcpy(dst, src,
                sub_type->category.array_data.
@@ -350,10 +350,10 @@ xbt_datadesc_memcpy_rec(xbt_cbps_t state,
             * array_count * sub_type->category.array_data.fixed_size;
 
       } else {
             * array_count * sub_type->category.array_data.fixed_size;
 
       } else {
-        XBT_VERB("Array of %ld stuff, copy it in one after the other",
+        XBT_VERB("Array of %lu stuff, copy it in one after the other",
               array_count);
         for (cpt = 0; cpt < array_count; cpt++) {
               array_count);
         for (cpt = 0; cpt < array_count; cpt++) {
-          XBT_VERB("Copy the %dth stuff out of %ld", cpt, array_count);
+          XBT_VERB("Copy the %uth stuff out of %lu", cpt, array_count);
           count +=
               xbt_datadesc_memcpy_rec(state, refs, sub_type, src_ptr,
                                        dst_ptr, 0, detect_cycle
           count +=
               xbt_datadesc_memcpy_rec(state, refs, sub_type, src_ptr,
                                        dst_ptr, 0, detect_cycle
index 498f56e..7165982 100644 (file)
@@ -656,7 +656,7 @@ static xbt_datadesc_type_t parse_struct(char *definition)
       if (field.tm.is_ref)
         PARSE_ERROR
             ("Not enough XBT_ANNOTATE to deal with all dereferencing levels of %s (%d '*' left)",
       if (field.tm.is_ref)
         PARSE_ERROR
             ("Not enough XBT_ANNOTATE to deal with all dereferencing levels of %s (%d '*' left)",
-             field.name, field.tm.is_ref);
+             field.name, (int)field.tm.is_ref);
 
       XBT_VERB("Append field '%s' to %p", field.name, (void *) struct_type);
       xbt_datadesc_struct_append(struct_type, field.name, field.type);
 
       XBT_VERB("Append field '%s' to %p", field.name, (void *) struct_type);
       xbt_datadesc_struct_append(struct_type, field.name, field.type);
index b66c85a..13b84d0 100644 (file)
@@ -252,7 +252,7 @@ XBT_INLINE void xbt_dict_set_ext(xbt_dict_t dict,
   xbt_dictelm_t current, previous = NULL;
   xbt_assert(dict);
 
   xbt_dictelm_t current, previous = NULL;
   xbt_assert(dict);
 
-  XBT_DEBUG("ADD %.*s hash = %d, size = %d, & = %d", key_len, key, hash_code,
+  XBT_DEBUG("ADD %.*s hash = %u, size = %d, & = %u", key_len, key, hash_code,
          dict->table_size, hash_code & dict->table_size);
   current = dict->table[hash_code & dict->table_size];
   while (current != NULL &&
          dict->table_size, hash_code & dict->table_size);
   current = dict->table[hash_code & dict->table_size];
   while (current != NULL &&
@@ -675,7 +675,7 @@ void xbt_dict_dump_sizes(xbt_dict_t dict)
         continue;
       if (size == 0)
         continue;
         continue;
       if (size == 0)
         continue;
-      printf("%delm x %u cells; ", count, size);
+      printf("%uelm x %u cells; ", count, size);
     }
   }
   printf("\n");
     }
   }
   printf("\n");
@@ -728,7 +728,7 @@ void xbt_dict_postexit(void)
         continue;
       if (size == 0)
         continue;
         continue;
       if (size == 0)
         continue;
-      printf("%delm x %d cells; ", count, size);
+      printf("%uelm x %d cells; ", count, size);
       avg += count * size;
       total_count += size;
     }
       avg += count * size;
       total_count += size;
     }
index c630ff0..6bf067c 100644 (file)
@@ -731,13 +731,13 @@ XBT_INLINE int xbt_dynar_compare(xbt_dynar_t d1, xbt_dynar_t d2,
        }
        if((d1->elmsize)!=(d2->elmsize))
        {
        }
        if((d1->elmsize)!=(d2->elmsize))
        {
-               XBT_DEBUG("Size of elmsize d1=%ld d2=%ld",d1->elmsize,d2->elmsize);
+               XBT_DEBUG("Size of elmsize d1=%lu d2=%lu",d1->elmsize,d2->elmsize);
                xbt_dynar_free(&d2);
                return 1; // xbt_die
        }
        if(xbt_dynar_length(d1) != xbt_dynar_length(d2))
        {
                xbt_dynar_free(&d2);
                return 1; // xbt_die
        }
        if(xbt_dynar_length(d1) != xbt_dynar_length(d2))
        {
-               XBT_DEBUG("Size of dynar d1=%ld d2=%ld",xbt_dynar_length(d1),xbt_dynar_length(d2));
+               XBT_DEBUG("Size of dynar d1=%lu d2=%lu",xbt_dynar_length(d1),xbt_dynar_length(d2));
                xbt_dynar_free(&d2);
                return 1;
        }
                xbt_dynar_free(&d2);
                return 1;
        }
@@ -798,14 +798,14 @@ XBT_TEST_UNIT("int", test_dynar_int, "Dynars of integers")
   for (cursor = 0; cursor < NB_ELEM; cursor++) {
     iptr = xbt_dynar_get_ptr(d, cursor);
     xbt_test_assert(cursor == *iptr,
   for (cursor = 0; cursor < NB_ELEM; cursor++) {
     iptr = xbt_dynar_get_ptr(d, cursor);
     xbt_test_assert(cursor == *iptr,
-                     "The retrieved value is not the same than the injected one (%d!=%d)",
+                     "The retrieved value is not the same than the injected one (%u!=%d)",
                      cursor, cpt);
   }
 
   /* 3. Traverse the dynar using the neat macro to that extend */
   xbt_dynar_foreach(d, cursor, cpt) {
     xbt_test_assert(cursor == cpt,
                      cursor, cpt);
   }
 
   /* 3. Traverse the dynar using the neat macro to that extend */
   xbt_dynar_foreach(d, cursor, cpt) {
     xbt_test_assert(cursor == cpt,
-                     "The retrieved value is not the same than the injected one (%d!=%d)",
+                     "The retrieved value is not the same than the injected one (%u!=%d)",
                      cursor, cpt);
   }
   /* end_of_traversal */
                      cursor, cpt);
   }
   /* end_of_traversal */
@@ -937,7 +937,7 @@ XBT_TEST_UNIT("insert",test_dynar_insert,"Using the xbt_dynar_insert and xbt_dyn
   /* 3. Traverse the dynar */
   xbt_dynar_foreach(d, cursor, cpt) {
     xbt_test_assert(cursor == cpt,
   /* 3. Traverse the dynar */
   xbt_dynar_foreach(d, cursor, cpt) {
     xbt_test_assert(cursor == cpt,
-                     "The retrieved value is not the same than the injected one (%d!=%d)",
+                     "The retrieved value is not the same than the injected one (%u!=%d)",
                      cursor, cpt);
   }
   /* end_of_traversal */
                      cursor, cpt);
   }
   /* end_of_traversal */
@@ -947,14 +947,14 @@ XBT_TEST_UNIT("insert",test_dynar_insert,"Using the xbt_dynar_insert and xbt_dyn
     xbt_dynar_set_as(d, cpt, int, cpt);
   xbt_dynar_foreach(d, cursor, cpt)
     xbt_test_assert(cursor == cpt,
     xbt_dynar_set_as(d, cpt, int, cpt);
   xbt_dynar_foreach(d, cursor, cpt)
     xbt_test_assert(cursor == cpt,
-                     "The retrieved value is not the same than the injected one (%d!=%d)",
+                     "The retrieved value is not the same than the injected one (%u!=%d)",
                      cursor, cpt);
 
   for (cpt = 0; cpt < NB_ELEM; cpt++) {
     int val;
     xbt_dynar_remove_at(d,0,&val);
     xbt_test_assert(cpt == val,
                      cursor, cpt);
 
   for (cpt = 0; cpt < NB_ELEM; cpt++) {
     int val;
     xbt_dynar_remove_at(d,0,&val);
     xbt_test_assert(cpt == val,
-                     "The retrieved value is not the same than the injected one (%d!=%d)",
+                     "The retrieved value is not the same than the injected one (%u!=%d)",
                      cursor, cpt);
   }
   xbt_test_assert(xbt_dynar_is_empty(d),
                      cursor, cpt);
   }
   xbt_test_assert(xbt_dynar_is_empty(d),
@@ -973,7 +973,7 @@ XBT_TEST_UNIT("insert",test_dynar_insert,"Using the xbt_dynar_insert and xbt_dyn
   /* 3. Traverse the dynar */
   xbt_dynar_foreach(d, cursor, cpt) {
     xbt_test_assert(cursor == cpt,
   /* 3. Traverse the dynar */
   xbt_dynar_foreach(d, cursor, cpt) {
     xbt_test_assert(cursor == cpt,
-                     "The retrieved value is not the same than the injected one (%d!=%d)",
+                     "The retrieved value is not the same than the injected one (%u!=%d)",
                      cursor, cpt);
   }
   /* end_of_traversal */
                      cursor, cpt);
   }
   /* end_of_traversal */
@@ -982,7 +982,7 @@ XBT_TEST_UNIT("insert",test_dynar_insert,"Using the xbt_dynar_insert and xbt_dyn
     int val;
     xbt_dynar_remove_at(d,xbt_dynar_length(d)-1,&val);
     xbt_test_assert(cpt == val,
     int val;
     xbt_dynar_remove_at(d,xbt_dynar_length(d)-1,&val);
     xbt_test_assert(cpt == val,
-                     "The retrieved value is not the same than the injected one (%d!=%d)",
+                     "The retrieved value is not the same than the injected one (%u!=%d)",
                      cursor, cpt);
   }
   xbt_test_assert(xbt_dynar_is_empty(d),
                      cursor, cpt);
   }
   xbt_test_assert(xbt_dynar_is_empty(d),
@@ -1179,7 +1179,7 @@ XBT_TEST_UNIT("string", test_dynar_string, "Dynars of strings")
   }
   /* 2. Traverse the dynar with the macro */
   xbt_dynar_foreach(d, iter, s1) {
   }
   /* 2. Traverse the dynar with the macro */
   xbt_dynar_foreach(d, iter, s1) {
-    sprintf(buf, "%d", NB_ELEM - iter - 1);
+    sprintf(buf, "%u", NB_ELEM - iter - 1);
     xbt_test_assert(!strcmp(buf, s1),
                      "The retrieved value is not the same than the injected one (%s!=%s)",
                      buf, s1);
     xbt_test_assert(!strcmp(buf, s1),
                      "The retrieved value is not the same than the injected one (%s!=%s)",
                      buf, s1);
index e56e413..160a41f 100644 (file)
@@ -803,7 +803,7 @@ void xbt_graph_save (xbt_graph_t span,
   xbt_dynar_t edges = xbt_graph_get_edges (span);
   unsigned int cpt;
   xbt_node_t node;
   xbt_dynar_t edges = xbt_graph_get_edges (span);
   unsigned int cpt;
   xbt_node_t node;
-  fprintf (file, "%ld\n", xbt_dynar_length (nodes));
+  fprintf (file, "%lu\n", xbt_dynar_length (nodes));
   xbt_dynar_foreach (nodes, cpt, node) {
     if (nname){
       fprintf (file, "%s\n", nname(node));
   xbt_dynar_foreach (nodes, cpt, node) {
     if (nname){
       fprintf (file, "%s\n", nname(node));
@@ -811,7 +811,7 @@ void xbt_graph_save (xbt_graph_t span,
       fprintf (file, "%p\n", node);
     }
   }
       fprintf (file, "%p\n", node);
     }
   }
-  fprintf (file, "%ld\n", xbt_dynar_length (edges));
+  fprintf (file, "%lu\n", xbt_dynar_length (edges));
   xbt_edge_t edge;
   xbt_dynar_foreach (edges, cpt, edge) {
     xbt_node_t source = xbt_graph_edge_get_source (edge);
   xbt_edge_t edge;
   xbt_dynar_foreach (edges, cpt, edge) {
     xbt_node_t source = xbt_graph_edge_get_source (edge);
index 9158305..eb09a35 100644 (file)
@@ -101,19 +101,19 @@ void xbt_set_add(xbt_set_t set, xbt_set_elm_t elm,
     elm->ID = _xbt_set_get_id(set);
     xbt_dict_set_ext(set->dict, elm->name, elm->name_len, elm, free_func);
     xbt_dynar_set(set->dynar, elm->ID, &elm);
     elm->ID = _xbt_set_get_id(set);
     xbt_dict_set_ext(set->dict, elm->name, elm->name_len, elm, free_func);
     xbt_dynar_set(set->dynar, elm->ID, &elm);
-    XBT_DEBUG("Insertion of key '%s' (id %d)", elm->name, elm->ID);
+    XBT_DEBUG("Insertion of key '%s' (id %u)", elm->name, elm->ID);
     xbt_ex_free(e);
   }
 
   if (found) {
     if (elm == found_in_dict) {
       XBT_DEBUG
     xbt_ex_free(e);
   }
 
   if (found) {
     if (elm == found_in_dict) {
       XBT_DEBUG
-          ("Ignoring request to insert the same element twice (key %s ; id %d)",
+          ("Ignoring request to insert the same element twice (key %s ; id %u)",
            elm->name, elm->ID);
       return;
     } else {
       elm->ID = found_in_dict->ID;
            elm->name, elm->ID);
       return;
     } else {
       elm->ID = found_in_dict->ID;
-      XBT_DEBUG("Reinsertion of key %s (id %d)", elm->name, elm->ID);
+      XBT_DEBUG("Reinsertion of key %s (id %u)", elm->name, elm->ID);
       xbt_dict_set_ext(set->dict, elm->name, elm->name_len, elm,
                        free_func);
       xbt_dynar_set(set->dynar, elm->ID, &elm);
       xbt_dict_set_ext(set->dict, elm->name, elm->name_len, elm,
                        free_func);
       xbt_dynar_set(set->dynar, elm->ID, &elm);
@@ -380,7 +380,7 @@ static void search_name(xbt_set_t head, const char *key)
 
   xbt_test_add("Search by name %s", key);
   elm = (my_elem_t) xbt_set_get_by_name(head, key);
 
   xbt_test_add("Search by name %s", key);
   elm = (my_elem_t) xbt_set_get_by_name(head, key);
-  xbt_test_log(" Found %s (under ID %d)\n",
+  xbt_test_log(" Found %s (under ID %u)\n",
                 elm ? elm->data : "(null)", elm ? elm->ID : -1);
   if (strcmp(key, elm->name))
     THROWF(mismatch_error, 0, "The key (%s) is not the one expected (%s)",
                 elm ? elm->data : "(null)", elm ? elm->ID : -1);
   if (strcmp(key, elm->name))
     THROWF(mismatch_error, 0, "The key (%s) is not the one expected (%s)",
@@ -401,7 +401,7 @@ static void search_id(xbt_set_t head, int id, const char *key)
                 elm ? elm->name : "(null)", elm ? elm->data : "(null)");
   if (id != elm->ID)
     THROWF(mismatch_error, 0,
                 elm ? elm->name : "(null)", elm ? elm->data : "(null)");
   if (id != elm->ID)
     THROWF(mismatch_error, 0,
-           "The found ID (%d) is not the one expected (%d)", elm->ID, id);
+           "The found ID (%u) is not the one expected (%d)", elm->ID, id);
   if (strcmp(key, elm->name))
     THROWF(mismatch_error, 0, "The key (%s) is not the one expected (%s)",
            elm->name, key);
   if (strcmp(key, elm->name))
     THROWF(mismatch_error, 0, "The key (%s) is not the one expected (%s)",
            elm->name, key);
@@ -418,7 +418,7 @@ static void traverse(xbt_set_t set)
 
   xbt_set_foreach(set, cursor, elm) {
     xbt_test_assert(elm, "Dude ! Got a null elm during traversal!");
 
   xbt_set_foreach(set, cursor, elm) {
     xbt_test_assert(elm, "Dude ! Got a null elm during traversal!");
-    xbt_test_log("Id(%d):  %s->%s\n", elm->ID, elm->name, elm->data);
+    xbt_test_log("Id(%u):  %s->%s\n", elm->ID, elm->name, elm->data);
     xbt_test_assert(!strcmp(elm->name, elm->data),
                      "Key(%s) != value(%s). Abording", elm->name,
                      elm->data);
     xbt_test_assert(!strcmp(elm->name, elm->data),
                      "Key(%s) != value(%s). Abording", elm->name,
                      elm->data);
@@ -549,7 +549,7 @@ XBT_TEST_UNIT("remove", test_set_remove, "Removing some values")
 
   debuged_add(set, "12anew", "12anew");
   elm = (my_elem_t) xbt_set_get_by_id(set, 1);
 
   debuged_add(set, "12anew", "12anew");
   elm = (my_elem_t) xbt_set_get_by_id(set, 1);
-  xbt_test_assert(elm->ID == 1, "elm->ID is %d but should be 1", elm->ID);
+  xbt_test_assert(elm->ID == 1, "elm->ID is %u but should be 1", elm->ID);
 
   xbt_set_free(&set);
 }
 
   xbt_set_free(&set);
 }
index d5f0417..89eadf1 100644 (file)
@@ -69,13 +69,13 @@ void xbt_matrix_dump(xbt_matrix_t matrix, const char *name, int coords,
 {
   unsigned int i, j;
 
 {
   unsigned int i, j;
 
-  fprintf(stderr, ">>> Matrix %s dump (%d x %d)\n", name, matrix->lines,
+  fprintf(stderr, ">>> Matrix %s dump (%u x %u)\n", name, matrix->lines,
           matrix->rows);
   for (i = 0; i < matrix->lines; i++) {
     fprintf(stderr, "  ");
     for (j = 0; j < matrix->rows; j++) {
       if (coords)
           matrix->rows);
   for (i = 0; i < matrix->lines; i++) {
     fprintf(stderr, "  ");
     for (j = 0; j < matrix->rows; j++) {
       if (coords)
-        fprintf(stderr, " (%d,%d)=", i, j);
+        fprintf(stderr, " (%u,%u)=", i, j);
       else
         fprintf(stderr, " ");
       display_fun(xbt_matrix_get_ptr(matrix, i, j));
       else
         fprintf(stderr, " ");
       display_fun(xbt_matrix_get_ptr(matrix, i, j));
@@ -109,7 +109,7 @@ void xbt_matrix_copy_values(xbt_matrix_t dst, xbt_matrix_t src,
   unsigned int i, j;
 
   XBT_DEBUG
   unsigned int i, j;
 
   XBT_DEBUG
-      ("Copy a %dx%d submatrix from %dx%d(of %dx%d) to %dx%d (of %dx%d)",
+      ("Copy a %ux%u submatrix from %ux%u(of %ux%u) to %ux%u (of %ux%u)",
        lsize, rsize, lpos_src, rpos_src, src->lines, src->rows, lpos_dst,
        rpos_dst, dst->lines, dst->rows);
 
        lsize, rsize, lpos_src, rpos_src, src->lines, src->rows, lpos_dst,
        rpos_dst, dst->lines, dst->rows);
 
@@ -212,7 +212,7 @@ void xbt_matrix_double_addmult(xbt_matrix_t A, xbt_matrix_t B,
   unsigned int i, j, k;
 
   xbt_assert(A->lines == C->lines,
   unsigned int i, j, k;
 
   xbt_assert(A->lines == C->lines,
-              "A->lines != C->lines (%d vs %d)", A->lines, C->lines);
+              "A->lines != C->lines (%u vs %u)", A->lines, C->lines);
   xbt_assert(B->rows == C->rows);
 
   for (i = 0; i < C->lines; i++)
   xbt_assert(B->rows == C->rows);
 
   for (i = 0; i < C->lines; i++)
index 7587c14..fd4ad3f 100644 (file)
@@ -292,13 +292,13 @@ void xbt_socket_meas_send(xbt_socket_t peer,
 
   for (sent_sofar = 0; sent_sofar < msg_amount; sent_sofar++) {
     XBT_CDEBUG(xbt_trp_meas,
 
   for (sent_sofar = 0; sent_sofar < msg_amount; sent_sofar++) {
     XBT_CDEBUG(xbt_trp_meas,
-            "Sent %lu msgs of %lu (size of each: %ld) to %s:%d",
+            "Sent %lu msgs of %lu (size of each: %lu) to %s:%d",
             sent_sofar, msg_amount, msg_size, xbt_socket_peer_name(peer),
             xbt_socket_peer_port(peer));
     peer->plugin->raw_send(peer, chunk, msg_size);
   }
   XBT_CDEBUG(xbt_trp_meas,
             sent_sofar, msg_amount, msg_size, xbt_socket_peer_name(peer),
             xbt_socket_peer_port(peer));
     peer->plugin->raw_send(peer, chunk, msg_size);
   }
   XBT_CDEBUG(xbt_trp_meas,
-          "Sent %lu msgs of %lu (size of each: %ld) to %s:%d", sent_sofar,
+          "Sent %lu msgs of %lu (size of each: %lu) to %s:%d", sent_sofar,
           msg_amount, msg_size, xbt_socket_peer_name(peer),
           xbt_socket_peer_port(peer));
 
           msg_amount, msg_size, xbt_socket_peer_name(peer),
           xbt_socket_peer_port(peer));
 
@@ -342,13 +342,13 @@ void xbt_socket_meas_recv(xbt_socket_t peer,
 
   for (got_sofar = 0; got_sofar < msg_amount; got_sofar++) {
     XBT_CDEBUG(xbt_trp_meas,
 
   for (got_sofar = 0; got_sofar < msg_amount; got_sofar++) {
     XBT_CDEBUG(xbt_trp_meas,
-            "Recvd %ld msgs of %lu (size of each: %ld) from %s:%d",
+            "Recvd %lu msgs of %lu (size of each: %lu) from %s:%d",
             got_sofar, msg_amount, msg_size, xbt_socket_peer_name(peer),
             xbt_socket_peer_port(peer));
     (peer->plugin->raw_recv) (peer, chunk, msg_size);
   }
   XBT_CDEBUG(xbt_trp_meas,
             got_sofar, msg_amount, msg_size, xbt_socket_peer_name(peer),
             xbt_socket_peer_port(peer));
     (peer->plugin->raw_recv) (peer, chunk, msg_size);
   }
   XBT_CDEBUG(xbt_trp_meas,
-          "Recvd %ld msgs of %lu (size of each: %ld) from %s:%d",
+          "Recvd %lu msgs of %lu (size of each: %lu) from %s:%d",
           got_sofar, msg_amount, msg_size, xbt_socket_peer_name(peer),
           xbt_socket_peer_port(peer));
 
           got_sofar, msg_amount, msg_size, xbt_socket_peer_name(peer),
           xbt_socket_peer_port(peer));
 
index e76bb4e..d72f8a6 100644 (file)
@@ -46,7 +46,7 @@ void xbt_dynar_dopar(xbt_dynar_t datas, void_f_int_pvoid_t function)
     return;
   }
   /* Start all workers */
     return;
   }
   /* Start all workers */
-  XBT_DEBUG("Dopar for %ld elements", xbt_dynar_length(datas));
+  XBT_DEBUG("Dopar for %lu elements", xbt_dynar_length(datas));
   xbt_dynar_foreach(datas, cursor, data) {
     worker_data_t w = xbt_new0(s_worker_data_t, 1);
     w->data = datas;
   xbt_dynar_foreach(datas, cursor, data) {
     worker_data_t w = xbt_new0(s_worker_data_t, 1);
     w->data = datas;
index 3c4b38d..bbe7f48 100644 (file)
@@ -326,7 +326,7 @@ static XBT_INLINE void xbt_trp_tcp_send(xbt_socket_t sock,
     int status = 0;
 
     status = tcp_write(sock->sd, data, (size_t) size);
     int status = 0;
 
     status = tcp_write(sock->sd, data, (size_t) size);
-    XBT_DEBUG("write(%d, %p, %ld);", sock->sd, data, size);
+    XBT_DEBUG("write(%d, %p, %lu);", sock->sd, data, size);
 
     if (status < 0) {
 #ifdef EWOULDBLOCK
 
     if (status < 0) {
 #ifdef EWOULDBLOCK
@@ -336,7 +336,7 @@ static XBT_INLINE void xbt_trp_tcp_send(xbt_socket_t sock,
 #endif
         continue;
 
 #endif
         continue;
 
-      THROWF(system_error, 0, "write(%d,%p,%ld) failed: %s",
+      THROWF(system_error, 0, "write(%d,%p,%lu) failed: %s",
              sock->sd, data, size, sock_errstr(sock_errno));
     }
 
              sock->sd, data, size, sock_errstr(sock_errno));
     }
 
@@ -368,15 +368,15 @@ xbt_trp_tcp_recv_withbuffer(xbt_socket_t sock,
   while (size > got) {
     int status = 0;
 
   while (size > got) {
     int status = 0;
 
-    XBT_DEBUG("read(%d, %p, %ld) got %d so far (%s)",
+    XBT_DEBUG("read(%d, %p, %lu) got %d so far (%s)",
            sock->sd, data + got, bufsize, got,
            hexa_str((unsigned char *) data, got, 0));
     status = tcp_read(sock->sd, data + got, (size_t) bufsize);
 
     if (status < 0) {
       THROWF(system_error, 0,
            sock->sd, data + got, bufsize, got,
            hexa_str((unsigned char *) data, got, 0));
     status = tcp_read(sock->sd, data + got, (size_t) bufsize);
 
     if (status < 0) {
       THROWF(system_error, 0,
-             "read(%d,%p,%d) from %s:%d failed: %s; got %d so far",
-             sock->sd, data + got, (int) size, xbt_socket_peer_name(sock),
+             "read(%d,%p,%lu) from %s:%d failed: %s; got %d so far",
+             sock->sd, data + got, size, xbt_socket_peer_name(sock),
              xbt_socket_peer_port(sock), sock_errstr(sock_errno), got);
     }
     XBT_DEBUG("Got %d more bytes (%s)", status,
              xbt_socket_peer_port(sock), sock_errstr(sock_errno), got);
     }
     XBT_DEBUG("Got %d more bytes (%s)", status,
@@ -474,9 +474,9 @@ xbt_trp_buf_send(xbt_socket_t sock,
     /* size of the chunk to receive in that shot */
     long int thissize =
         min(size - chunk_pos, data->buffsize - data->out_buf.size);
     /* size of the chunk to receive in that shot */
     long int thissize =
         min(size - chunk_pos, data->buffsize - data->out_buf.size);
-    XBT_DEBUG("Set the chars %d..%ld into the buffer; size=%ld, ctn=(%s)",
-           (int) data->out_buf.size,
-           ((int) data->out_buf.size) + thissize - 1, size,
+    XBT_DEBUG("Set the chars %d..%ld into the buffer; size=%lu, ctn=(%s)",
+           data->out_buf.size,
+           data->out_buf.size + thissize - 1, size,
            hexa_str((unsigned char *) chunk, thissize, 0));
 
     memcpy(data->out_buf.data + data->out_buf.size, chunk + chunk_pos,
            hexa_str((unsigned char *) chunk, thissize, 0));
 
     memcpy(data->out_buf.data + data->out_buf.size, chunk + chunk_pos,
@@ -484,7 +484,7 @@ xbt_trp_buf_send(xbt_socket_t sock,
 
     data->out_buf.size += thissize;
     chunk_pos += thissize;
 
     data->out_buf.size += thissize;
     chunk_pos += thissize;
-    XBT_DEBUG("New pos = %d; Still to send = %ld of %ld; ctn sofar=(%s)",
+    XBT_DEBUG("New pos = %d; Still to send = %lu of %lu; ctn sofar=(%s)",
            data->out_buf.size, size - chunk_pos, size,
            hexa_str((unsigned char *) chunk, chunk_pos, 0));
 
            data->out_buf.size, size - chunk_pos, size,
            hexa_str((unsigned char *) chunk, chunk_pos, 0));
 
@@ -528,7 +528,7 @@ xbt_trp_buf_recv(xbt_socket_t sock, char *chunk, unsigned long int size)
 
     data->in_buf.pos += thissize;
     chunk_pos += thissize;
 
     data->in_buf.pos += thissize;
     chunk_pos += thissize;
-    XBT_DEBUG("New pos = %d; Still to receive = %ld of %ld. Ctn so far=(%s)",
+    XBT_DEBUG("New pos = %d; Still to receive = %lu of %lu. Ctn so far=(%s)",
            data->in_buf.pos, size - chunk_pos, size,
            hexa_str((unsigned char *) chunk, chunk_pos, 0));
   }
            data->in_buf.pos, size - chunk_pos, size,
            hexa_str((unsigned char *) chunk, chunk_pos, 0));
   }
index 88d41fe..2460d7f 100644 (file)
@@ -245,7 +245,7 @@ static void test_hetestruct(xbt_socket_t sock, int direction)
   if (direction == READ || direction == COPY) {
     xbt_assert(i->c1 == j->c1);
     xbt_assert(i->c2 == j->c2);
   if (direction == READ || direction == COPY) {
     xbt_assert(i->c1 == j->c1);
     xbt_assert(i->c2 == j->c2);
-    xbt_assert(i->l1 == j->l1, "i->l1(=%ld)  !=  j->l1(=%ld)", i->l1,
+    xbt_assert(i->l1 == j->l1, "i->l1(=%lu)  !=  j->l1(=%lu)", i->l1,
                 j->l1);
     xbt_assert(i->l2 == j->l2);
     free(j);
                 j->l1);
     xbt_assert(i->l2 == j->l2);
     free(j);
@@ -274,7 +274,7 @@ static void test_hetestruct_array(xbt_socket_t sock, int direction)
       xbt_assert(p->c1 == q->c1);
       xbt_assert(p->c2 == q->c2);
       xbt_assert(p->l1 == p->l1,
       xbt_assert(p->c1 == q->c1);
       xbt_assert(p->c2 == q->c2);
       xbt_assert(p->l1 == p->l1,
-                  "for cpt=%d i->l1(=%ld)  !=  j->l1(=%ld)", cpt, p->l1,
+                  "for cpt=%d i->l1(=%lu)  !=  j->l1(=%lu)", cpt, p->l1,
                   q->l1);
       xbt_assert(q->l2 == p->l2);
     }
                   q->l1);
       xbt_assert(q->l2 == p->l2);
     }
index f2e0c5e..cec9426 100644 (file)
@@ -30,7 +30,7 @@ static const char *parmap_mode_name(e_xbt_parmap_mode_t mode)
     snprintf(name, sizeof name, "DEFAULT");
     break;
   default:
     snprintf(name, sizeof name, "DEFAULT");
     break;
   default:
-    snprintf(name, sizeof name, "UNKNOWN(%d)", mode);
+    snprintf(name, sizeof name, "UNKNOWN(%d)", (int)mode);
     break;
   }
   return name;
     break;
   }
   return name;
index 2622126..756666d 100644 (file)
@@ -775,7 +775,7 @@ void *rctx_wait(void *r)
       XBT_INFO("<%s> No output before timeout", rctx->filepos);
     XBT_ERROR("Test suite `%s': NOK (<%s> timeout after %d sec)",
            testsuite_name, rctx->filepos, timeout_value);
       XBT_INFO("<%s> No output before timeout", rctx->filepos);
     XBT_ERROR("Test suite `%s': NOK (<%s> timeout after %d sec)",
            testsuite_name, rctx->filepos, timeout_value);
-    XBT_DEBUG("<%s> Interrupted = %d", rctx->filepos, rctx->interrupted);
+    XBT_DEBUG("<%s> Interrupted = %d", rctx->filepos, (int)rctx->interrupted);
     if (!rctx->interrupted) {
       xbt_os_mutex_release(rctx->interruption);
       rctx_armageddon(rctx, 3);
     if (!rctx->interrupted) {
       xbt_os_mutex_release(rctx->interruption);
       rctx_armageddon(rctx, 3);
index 64e9106..9905ad7 100644 (file)
@@ -61,5 +61,5 @@ const char *signal_name(unsigned int got, char *expected)
     if (signals[i].number == got)
       return (signals[i].name);
 
     if (signals[i].number == got)
       return (signals[i].name);
 
-  return bprintf("SIG UNKNOWN (%d)", got);
+  return bprintf("SIG UNKNOWN (%u)", got);
 }
 }