Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix signedness errors in format strings.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 27 Jul 2017 12:08:29 +0000 (14:08 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 27 Jul 2017 12:08:29 +0000 (14:08 +0200)
56 files changed:
examples/msg/app-chainsend/broadcaster.c
examples/msg/app-chainsend/peer.c
examples/msg/cloud-masterworker/cloud-masterworker.c
examples/msg/dht-kademlia/answer.c
examples/msg/dht-kademlia/dht-kademlia.c
examples/msg/dht-kademlia/node.c
examples/msg/dht-kademlia/routing_table.c
examples/msg/dht-pastry/dht-pastry.c
examples/msg/mc/bugged2.c
examples/msg/mc/bugged3.c
examples/simdag/dag-dotload/sd_dag-dotload.c
examples/simdag/daxload/sd_daxload.c
examples/simdag/schedule-dotload/sd_schedule-dotload.c
examples/smpi/NAS/dt.c
src/kernel/routing/ClusterZone.cpp
src/kernel/routing/DragonflyZone.cpp
src/kernel/routing/FatTreeZone.cpp
src/kernel/routing/FullZone.cpp
src/kernel/routing/NetZoneImpl.cpp
src/kernel/routing/TorusZone.cpp
src/kernel/routing/VivaldiZone.cpp
src/mc/checker/CommunicationDeterminismChecker.cpp
src/mc/checker/LivenessChecker.cpp
src/mc/checker/SafetyChecker.cpp
src/mc/compare.cpp
src/mc/mc_dwarf.cpp
src/mc/mc_record.cpp
src/mc/mc_xbt.cpp
src/mc/remote/Client.cpp
src/mc/remote/RemoteClient.cpp
src/msg/msg_synchro.cpp
src/simix/smx_global.cpp
src/simix/smx_synchro.cpp
src/smpi/colls/allgatherv/allgatherv-ompi-bruck.cpp
src/smpi/colls/bcast/bcast-ompi-split-bintree.cpp
src/smpi/colls/reduce/reduce-ompi.cpp
src/smpi/internals/smpi_memory.cpp
src/smpi/internals/smpi_process.cpp
src/smpi/internals/smpi_shared.cpp
src/smpi/internals/smpi_utils.cpp
src/smpi/mpi/smpi_f2c.cpp
src/surf/sg_platf.cpp
src/surf/surf_interface.cpp
src/surf/trace_mgr_test.cpp
src/xbt/backtrace_linux.cpp
src/xbt/dict.cpp
src/xbt/xbt_os_thread.c
teshsuite/msg/host_on_off_processes/host_on_off_processes.c
teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp
teshsuite/smpi/mpich3-test/coll/allgatherv4.c
teshsuite/smpi/mpich3-test/datatype/dataalign.c
teshsuite/smpi/mpich3-test/datatype/longdouble.c
teshsuite/smpi/mpich3-test/datatype/sendrecvt2.c
teshsuite/smpi/mpich3-test/util/dtypes.c
teshsuite/surf/maxmin_bench/maxmin_bench.cpp
teshsuite/xbt/mmalloc/mmalloc_test.cpp

index 61a1aca..79612fc 100644 (file)
@@ -114,9 +114,9 @@ int broadcaster(int argc, char *argv[])
   /* argv[2] is the number of pieces */
   if (argc > 2) {
     piece_count = xbt_str_parse_int(argv[2], "Invalid number of pieces: %s");
-    XBT_DEBUG("piece_count set to %d", piece_count);
+    XBT_DEBUG("piece_count set to %u", piece_count);
   } else {
-    XBT_DEBUG("No piece_count specified, defaulting to %d", piece_count);
+    XBT_DEBUG("No piece_count specified, defaulting to %u", piece_count);
   }
   broadcaster_t bc = broadcaster_init(host_list, piece_count);
 
index de72e55..1201149 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -29,11 +29,11 @@ int peer_execute_task(peer_t peer, msg_task_t task)
   int done = 0;
   message_t msg = MSG_task_get_data(task);
 
-  XBT_DEBUG("Peer %s got message of type %d\n", peer->me, msg->type);
+  XBT_DEBUG("Peer %s got message of type %u\n", peer->me, msg->type);
   if (msg->type == MESSAGE_BUILD_CHAIN)
     peer_init_chain(peer, msg);
   else if (msg->type == MESSAGE_SEND_DATA) {
-    xbt_assert(peer->init, "peer_execute_task() failed: got msg_type %d before initialization", msg->type);
+    xbt_assert(peer->init, "peer_execute_task() failed: got msg_type %u before initialization", msg->type);
     if (peer->next != NULL)
       peer_forward_msg(peer, msg);
     peer->pieces++;
@@ -63,7 +63,7 @@ msg_error_t peer_wait_for_message(peer_t peer)
     if (idx != -1) {
       comm = xbt_dynar_get_as(peer->pending_recvs, idx, msg_comm_t);
       status = MSG_comm_get_status(comm);
-      XBT_DEBUG("peer_wait_for_message: error code = %d", status);
+      XBT_DEBUG("peer_wait_for_message: error code = %u", status);
       xbt_assert(status == MSG_OK, "peer_wait_for_message() failed");
 
       task = MSG_comm_get_task(comm);
index 17242ba..8d31f14 100644 (file)
@@ -122,8 +122,8 @@ static int master_fun(int argc, char *argv[])
   XBT_INFO("# Add one more process on each VM");
   xbt_dynar_foreach(vms, i, vm) {
     unsigned int index = i + xbt_dynar_length(vms);
-    char *vm_name = bprintf("VM%02d", i);
-    char *pr_name = bprintf("WRK%02d", index);
+    char *vm_name      = bprintf("VM%02u", i);
+    char *pr_name      = bprintf("WRK%02u", index);
 
     XBT_INFO("put a process (%s) on %s", pr_name, vm_name);
     MSG_process_create(pr_name, worker_fun, NULL, (msg_host_t)vm);
index 6fb5f75..14b9020 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -35,9 +35,9 @@ void answer_print(answer_t answer)
 {
   unsigned int cpt;
   node_contact_t contact;
-  XBT_INFO("Searching %08x, size %d", answer->destination_id, answer->size);
+  XBT_INFO("Searching %08x, size %u", answer->destination_id, answer->size);
   xbt_dynar_foreach(answer->nodes, cpt, contact) {
-    XBT_INFO("Node %08x: %08x is at distance %d", cpt, contact->id, contact->distance);
+    XBT_INFO("Node %08x: %08x is at distance %u", cpt, contact->id, contact->distance);
   }
 }
 
index c0c6999..d40ca6c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2014-2016. The SimGrid Team.
+/* Copyright (c) 2012, 2014-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -96,7 +96,7 @@ static int node(int argc, char *argv[])
     XBT_INFO("I couldn't join the network :(");
   }
   XBT_DEBUG("I'm leaving the network");
-  XBT_INFO("%d/%d FIND_NODE have succeeded", node->find_node_success, node->find_node_success + node->find_node_failed);
+  XBT_INFO("%u/%u FIND_NODE have succeeded", node->find_node_success, node->find_node_success + node->find_node_failed);
   node_free(node);
 
   return 0;
@@ -229,8 +229,8 @@ unsigned int find_node(node_t node, unsigned int id_to_find, unsigned int count_
               answers++;
 
               nodes_added = answer_merge(node_list, data->answer);
-              XBT_DEBUG("Received an answer from %s (%s) with %ld nodes on it",
-                        data->answer_to, data->issuer_host_name, xbt_dynar_length(data->answer->nodes));
+              XBT_DEBUG("Received an answer from %s (%s) with %lu nodes on it", data->answer_to, data->issuer_host_name,
+                        xbt_dynar_length(data->answer->nodes));
 
               task_free(node->task_received);
             } else {
@@ -254,12 +254,12 @@ unsigned int find_node(node_t node, unsigned int id_to_find, unsigned int count_
     if (count_in_stats)
       node->find_node_success++;
     if (queries > 4)
-      XBT_VERB("FIND_NODE on %08x success in %d steps", id_to_find, steps);
+      XBT_VERB("FIND_NODE on %08x success in %u steps", id_to_find, steps);
     node_routing_table_update(node, id_to_find);
   } else {
     if (count_in_stats) {
       node->find_node_failed++;
-      XBT_VERB("%08x not found in %d steps", id_to_find, steps);
+      XBT_VERB("%08x not found in %u steps", id_to_find, steps);
     }
   }
   answer_free(node_list);
index c0741d6..2d8c22f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2012-2016. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -20,7 +20,7 @@ node_t node_init(unsigned int node_id)
 
   node->id = node_id;
   node->table = routing_table_init(node_id);
-  snprintf(node->mailbox,MAILBOX_NAME_SIZE-1, "%d", node_id);
+  snprintf(node->mailbox, MAILBOX_NAME_SIZE - 1, "%u", node_id);
   node->find_node_failed = 0;
   node->find_node_success = 0;
 
@@ -139,7 +139,7 @@ unsigned int get_node_prefix(unsigned int id, unsigned int nb_bits)
 /** @brief Gets the mailbox name of a host given its identifier */
 void get_node_mailbox(unsigned int id, char *mailbox)
 {
-  snprintf(mailbox,MAILBOX_NAME_SIZE-1, "%d", id);
+  snprintf(mailbox, MAILBOX_NAME_SIZE - 1, "%u", id);
 }
 
 /** Constructor, build a new contact information. */
index f0d6a6e..a109676 100644 (file)
@@ -51,9 +51,9 @@ void routing_table_print(routing_table_t table)
 
   for (unsigned int i = 0; i <= identifier_size; i++) {
     if (!xbt_dynar_is_empty(table->buckets[i].nodes)) {
-      XBT_INFO("Bucket number %d: ", i);
+      XBT_INFO("Bucket number %u: ", i);
       xbt_dynar_foreach(table->buckets[i].nodes, j, value) {
-        XBT_INFO("Element %d: %08x", j, value);
+        XBT_INFO("Element %u: %08x", j, value);
       }
     }
   }
index 517797e..e9fc5d4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2015. The SimGrid Team.
+/* Copyright (c) 2013-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -32,12 +32,12 @@ static int timeout = 50;
 static int max_simulation_time = 1000;
 
 typedef struct s_node {
-  int id;                                 //128bits generated random(2^128 -1)
-  int known_id;
+  unsigned id;                            //128bits generated random(2^128 -1)
+  unsigned known_id;
   char mailbox[MAILBOX_NAME_SIZE];        // my mailbox name (string representation of the id)
-  int namespace_set[NAMESPACE_SIZE];
-  int neighborhood_set[NEIGHBORHOOD_SIZE];
-  int routing_table[LEVELS_COUNT][LEVEL_SIZE];
+  unsigned namespace_set[NAMESPACE_SIZE];
+  unsigned neighborhood_set[NEIGHBORHOOD_SIZE];
+  unsigned routing_table[LEVELS_COUNT][LEVEL_SIZE];
   int ready;
   msg_comm_t comm_receive;                // current communication to receive
   xbt_dynar_t pending_tasks;
@@ -45,10 +45,10 @@ typedef struct s_node {
 typedef s_node_t* node_t;
 
 typedef struct s_state {
-  int id;
-  int namespace_set[NAMESPACE_SIZE];
-  int neighborhood_set[NEIGHBORHOOD_SIZE];
-  int routing_table[LEVELS_COUNT][LEVEL_SIZE];
+  unsigned id;
+  unsigned namespace_set[NAMESPACE_SIZE];
+  unsigned neighborhood_set[NEIGHBORHOOD_SIZE];
+  unsigned routing_table[LEVELS_COUNT][LEVEL_SIZE];
 } s_state_t;
 typedef s_state_t* state_t;
 
@@ -62,9 +62,9 @@ typedef enum {
 
 typedef struct s_task_data {
   e_task_type_t type;                     // type of task
-  int sender_id;                          // id parameter (used by some types of tasks)
+  unsigned sender_id;                     // id parameter (used by some types of tasks)
   //int request_finger;                     // finger parameter (used by some types of tasks)
-  int answer_id;                          // answer (used by some types of tasks)
+  unsigned answer_id;                     // answer (used by some types of tasks)
   char answer_to[MAILBOX_NAME_SIZE];      // mailbox to send an answer to (if any)
   //const char* issuer_host_name;           // used for logging
   int steps;
@@ -190,7 +190,7 @@ static state_t node_get_state(node_t node) {
 }
 
 static void print_node_id(node_t node) {
-  XBT_INFO(" Id: %i '%08x' ", node->id, node->id);
+  XBT_INFO(" Id: %u '%08x' ", node->id, node->id);
 }
 
 static void print_node_neighborood_set(node_t node) {
@@ -230,14 +230,14 @@ static void handle_task(node_t node, msg_task_t task) {
   int j;
   int min;
   int max;
-  int next;
+  unsigned next;
   msg_task_t task_sent;
   task_data_t req_data;
   task_data_t task_data = (task_data_t) MSG_task_get_data(task);
   e_task_type_t type = task_data->type;
   // If the node is not ready keep the task for later
   if (node->ready != 0 && !(type==TASK_JOIN_LAST_REPLY || type==TASK_JOIN_REPLY)) {
-    XBT_DEBUG("Task pending %i", type);
+    XBT_DEBUG("Task pending %u", type);
     xbt_dynar_push(node->pending_tasks, &task);
     return;
   }
@@ -259,7 +259,7 @@ static void handle_task(node_t node, msg_task_t task) {
         task_data->steps++;
         task_sent = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, task_data);
         if (MSG_task_send_with_timeout(task_sent, mailbox, timeout)== MSG_TIMEOUT) {
-          XBT_DEBUG("Timeout expired when forwarding join to next %d", next);
+          XBT_DEBUG("Timeout expired when forwarding join to next %u", next);
           task_free(task_sent);
         }
         type = TASK_JOIN_REPLY;
@@ -272,7 +272,7 @@ static void handle_task(node_t node, msg_task_t task) {
       req_data->state = node_get_state(node);
       task_sent = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data);
       if (MSG_task_send_with_timeout(task_sent, task_data->answer_to, timeout)== MSG_TIMEOUT) {
-        XBT_DEBUG("Timeout expired when sending back the current node state to the joining node to %d", node->id);
+        XBT_DEBUG("Timeout expired when sending back the current node state to the joining node to %u", node->id);
         task_free(task_sent);
       }
       break;
@@ -311,7 +311,7 @@ static void handle_task(node_t node, msg_task_t task) {
       node->ready--;
       // if the node is ready, do all the pending tasks and send update to known nodes
       if (node->ready==0) {
-        XBT_DEBUG("Node %i is ready!!!", node->id);
+        XBT_DEBUG("Node %u is ready!!!", node->id);
         while(xbt_dynar_length(node->pending_tasks)){
           msg_task_t task;
           xbt_dynar_shift(node->pending_tasks, &task);
@@ -342,10 +342,10 @@ static void handle_task(node_t node, msg_task_t task) {
       break;
     /* Received an update of state */
     case TASK_UPDATE:
-      XBT_DEBUG("Task update %i !!!", node->id);
+      XBT_DEBUG("Task update %u !!!", node->id);
 
       /* Update namespace ses */
-      XBT_INFO("Task update from %i !!!", task_data->sender_id);
+      XBT_INFO("Task update from %u !!!", task_data->sender_id);
       XBT_INFO("Node:");
       print_node_id(node);
       print_node_namespace_set(node);
@@ -447,7 +447,7 @@ static int join(node_t node){
   msg_task_t task_sent = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data);
   XBT_DEBUG("Trying to join Pastry ring... (with node %s)", mailbox);
   if (MSG_task_send_with_timeout(task_sent, mailbox, timeout)== MSG_TIMEOUT) {
-    XBT_DEBUG("Timeout expired when joining ring with node %d", node->known_id);
+    XBT_DEBUG("Timeout expired when joining ring with node %u", node->known_id);
     task_free(task_sent);
   }
 
index 90dba11..fdcc4ec 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2015. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2017. 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. */
@@ -23,25 +23,25 @@ static int server(int argc, char *argv[])
   long val1 = xbt_str_parse_int(MSG_task_get_name(task1), "Task name is not a numerical ID: %s");
   MSG_task_destroy(task1);
   task1 = NULL;
-  XBT_INFO("Received %lu", val1);
+  XBT_INFO("Received %ld", val1);
 
   MSG_task_receive(&task2, "mymailbox");
   long val2 = xbt_str_parse_int(MSG_task_get_name(task2), "Task name is not a numerical ID: %s");
   MSG_task_destroy(task2);
   task2 = NULL;
-  XBT_INFO("Received %lu", val2);
+  XBT_INFO("Received %ld", val2);
 
   MC_assert(MIN(val1, val2) == 1);
 
   MSG_task_receive(&task1, "mymailbox");
   val1 = xbt_str_parse_int(MSG_task_get_name(task1), "Task name is not a numerical ID: %s");
   MSG_task_destroy(task1);
-  XBT_INFO("Received %lu", val1);
+  XBT_INFO("Received %ld", val1);
 
   MSG_task_receive(&task2, "mymailbox");
   val2 = xbt_str_parse_int(MSG_task_get_name(task2), "Task name is not a numerical ID: %s");
   MSG_task_destroy(task2);
-  XBT_INFO("Received %lu", val2);
+  XBT_INFO("Received %ld", val2);
 
   XBT_INFO("OK");
   return 0;
index 879c37d..5e805d9 100644 (file)
@@ -29,7 +29,7 @@ static int server(int argc, char *argv[])
   MSG_comm_wait(comm2, -1);
 
   long val1 = xbt_str_parse_int(MSG_task_get_name(task1), "Task name is not a numerical ID: %s");
-  XBT_INFO("Received %lu", val1);
+  XBT_INFO("Received %ld", val1);
 
   MC_assert(val1 == 2);
 
index 176bd08..7dfd2f0 100644 (file)
@@ -1,6 +1,6 @@
 /* simple test trying to load a DOT file.                                   */
 
-/* Copyright (c) 2010-2015. The SimGrid Team.
+/* Copyright (c) 2010-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -95,7 +95,7 @@ int main(int argc, char **argv)
           sg_host_get_name(wsl[0]), sg_host_get_name(wsl[1]), SD_task_get_amount(task), SD_task_get_name(task));
       break;
     default:
-      xbt_die("Task %s is of unknown kind %d", SD_task_get_name(task), SD_task_get_kind(task));
+      xbt_die("Task %s is of unknown kind %u", SD_task_get_name(task), SD_task_get_kind(task));
     }
     SD_task_destroy(task);
   }
index ef3d029..8276fc9 100644 (file)
@@ -1,6 +1,6 @@
 /* simple test trying to load a DAX file.                                   */
 
-/* Copyright (c) 2009-2015. The SimGrid Team.
+/* Copyright (c) 2009-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -101,7 +101,7 @@ int main(int argc, char **argv)
               sg_host_get_name(wsl[0]), SD_task_get_amount(task), SD_task_get_name(task));
       break;
     default:
-      xbt_die("Task %s is of unknown kind %d", SD_task_get_name(task), SD_task_get_kind(task));
+      xbt_die("Task %s is of unknown kind %u", SD_task_get_name(task), SD_task_get_kind(task));
     }
     SD_task_destroy(task);
   }
index aa77528..f4f1355 100644 (file)
@@ -1,6 +1,6 @@
 /* simple test trying to load a DOT file.                                   */
 
-/* Copyright (c) 2010-2016. The SimGrid Team.
+/* Copyright (c) 2010-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@ int main(int argc, char **argv)
           sg_host_get_name(wsl[0]), sg_host_get_name(wsl[1]), SD_task_get_amount(task), SD_task_get_name(task));
       break;
     default:
-      xbt_die("Task %s is of unknown kind %d", SD_task_get_name(task), SD_task_get_kind(task));
+      xbt_die("Task %s is of unknown kind %u", SD_task_get_name(task), SD_task_get_kind(task));
     }
     SD_task_destroy(task);
   }
index 7dacc29..45398c9 100644 (file)
@@ -180,14 +180,14 @@ static DGraph *buildSH(const char cls){
   tmpS>>=1;
   }
   for(i=0;i<numSources;i++){
-  snprintf(nm,BLOCK_SIZE,"Source.%d",i);
-  nd=newNode(nm);
-  AttachNode(dg,nd);
+    snprintf(nm, BLOCK_SIZE, "Source.%u", i);
+    nd = newNode(nm);
+    AttachNode(dg, nd);
   }
   for(j=0;j<numOfLayers;j++){
     mask=0x00000001<<j;
     for(i=0;i<numSources;i++){
-      snprintf(nm,BLOCK_SIZE,"Comparator.%d",(i+j*firstLayerNode));
+      snprintf(nm, BLOCK_SIZE, "Comparator.%u", (i + j * firstLayerNode));
       nd=newNode(nm);
       AttachNode(dg,nd);
       ndoff=i&(~mask);
@@ -203,7 +203,7 @@ static DGraph *buildSH(const char cls){
   }
   mask=0x00000001<<numOfLayers;
   for(i=0;i<numSources;i++){
-    snprintf(nm,BLOCK_SIZE,"Sink.%d",i);
+    snprintf(nm, BLOCK_SIZE, "Sink.%u", i);
     nd=newNode(nm);
     AttachNode(dg,nd);
     ndoff=i&(~mask);
index 1a191c8..52f8bb1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2017. 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. */
@@ -22,7 +22,7 @@ ClusterZone::ClusterZone(NetZone* father, const char* name) : NetZoneImpl(father
 
 void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
 {
-  XBT_VERB("cluster getLocalRoute from '%s'[%d] to '%s'[%d]", src->cname(), src->id(), dst->cname(), dst->id());
+  XBT_VERB("cluster getLocalRoute from '%s'[%u] to '%s'[%u]", src->cname(), src->id(), dst->cname(), dst->id());
   xbt_assert(not privateLinks_.empty(),
              "Cluster routing: no links attached to the source node - did you use host_link tag?");
 
index a89ff4b..4975caf 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2014-2017. 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. */
@@ -286,7 +286,7 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_c
   if (dst->isRouter() || src->isRouter())
     return;
 
-  XBT_VERB("dragonfly getLocalRout from '%s'[%d] to '%s'[%d]", src->name().c_str(), src->id(), dst->name().c_str(),
+  XBT_VERB("dragonfly getLocalRout from '%s'[%u] to '%s'[%u]", src->name().c_str(), src->id(), dst->name().c_str(),
            dst->id());
 
   if ((src->id() == dst->id()) && hasLoopback_) {
index 9031a4f..49f8b8b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2014-2017. 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,16 +64,16 @@ void FatTreeZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cba
 
   /* Let's find the source and the destination in our internal structure */
   auto searchedNode = this->computeNodes_.find(src->id());
-  xbt_assert(searchedNode != this->computeNodes_.end(), "Could not find the source %s [%d] in the fat tree",
+  xbt_assert(searchedNode != this->computeNodes_.end(), "Could not find the source %s [%u] in the fat tree",
              src->name().c_str(), src->id());
   FatTreeNode* source = searchedNode->second;
 
   searchedNode = this->computeNodes_.find(dst->id());
-  xbt_assert(searchedNode != this->computeNodes_.end(), "Could not find the destination %s [%d] in the fat tree",
+  xbt_assert(searchedNode != this->computeNodes_.end(), "Could not find the destination %s [%u] in the fat tree",
              dst->name().c_str(), dst->id());
   FatTreeNode* destination = searchedNode->second;
 
-  XBT_VERB("Get route and latency from '%s' [%d] to '%s' [%d] in a fat tree", src->name().c_str(), src->id(),
+  XBT_VERB("Get route and latency from '%s' [%u] to '%s' [%u] in a fat tree", src->name().c_str(), src->id(),
            dst->name().c_str(), dst->id());
 
   /* In case destination is the source, and there is a loopback, let's use it instead of going up to a switch */
@@ -242,7 +242,7 @@ void FatTreeZone::generateSwitches()
 
   if (this->nodesByLevel_[0] != this->nodes_.size()) {
     surf_parse_error("The number of provided nodes does not fit with the wanted topology."
-                     " Please check your platform description (We need %d nodes, we got %zu)",
+                     " Please check your platform description (We need %u nodes, we got %zu)",
                      this->nodesByLevel_[0], this->nodes_.size());
     return;
   }
@@ -264,7 +264,7 @@ void FatTreeZone::generateSwitches()
   for (unsigned int i = 0; i < this->levels_; i++) {
     for (unsigned int j = 0; j < this->nodesByLevel_[i + 1]; j++) {
       FatTreeNode* newNode = new FatTreeNode(this->cluster_, --k, i + 1, j);
-      XBT_DEBUG("We create the switch %d(%d,%d)", newNode->id, newNode->level, newNode->position);
+      XBT_DEBUG("We create the switch %d(%u,%u)", newNode->id, newNode->level, newNode->position);
       newNode->children.resize(this->lowerLevelNodesNumber_[i] * this->lowerLevelPortsNumber_[i]);
       if (i != this->levels_ - 1) {
         newNode->parents.resize(this->upperLevelNodesNumber_[i + 1] * this->lowerLevelPortsNumber_[i + 1]);
@@ -348,7 +348,7 @@ void FatTreeZone::addLink(FatTreeNode* parent, unsigned int parentPort, FatTreeN
 {
   FatTreeLink* newLink;
   newLink = new FatTreeLink(this->cluster_, child, parent);
-  XBT_DEBUG("Creating a link between the parent (%d,%d,%u) and the child (%d,%d,%u)", parent->level, parent->position,
+  XBT_DEBUG("Creating a link between the parent (%u,%u,%u) and the child (%u,%u,%u)", parent->level, parent->position,
             parentPort, child->level, child->position, childPort);
   parent->children[parentPort] = newLink;
   child->parents[childPort]    = newLink;
index 7f6a98e..9bae539 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2017. 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. */
@@ -60,7 +60,7 @@ FullZone::~FullZone()
 
 void FullZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t res, double* lat)
 {
-  XBT_DEBUG("full getLocalRoute from %s[%d] to %s[%d]", src->cname(), src->id(), dst->cname(), dst->id());
+  XBT_DEBUG("full getLocalRoute from %s[%u] to %s[%u]", src->cname(), src->id(), dst->cname(), dst->id());
 
   unsigned int table_size        = getTableSize();
   sg_platf_route_cbarg_t e_route = TO_ROUTE_FULL(src->id(), dst->id());
index 1486801..30b2750 100644 (file)
@@ -32,7 +32,7 @@ NetZoneImpl::NetZoneImpl(NetZone* father, const char* name) : NetZone(father, na
              "Refusing to create a second NetZone called '%s'.", name);
 
   netpoint_ = new NetPoint(name, NetPoint::Type::NetZone, static_cast<NetZoneImpl*>(father));
-  XBT_DEBUG("NetZone '%s' created with the id '%d'", name, netpoint_->id());
+  XBT_DEBUG("NetZone '%s' created with the id '%u'", name, netpoint_->id());
 }
 NetZoneImpl::~NetZoneImpl()
 {
index 7f6b210..399ac2e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2014-2017. 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. */
@@ -97,7 +97,7 @@ void TorusZone::parse_specific_arguments(sg_platf_cluster_cbarg_t cluster)
 void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
 {
 
-  XBT_VERB("torus getLocalRoute from '%s'[%d] to '%s'[%d]", src->name().c_str(), src->id(), dst->name().c_str(),
+  XBT_VERB("torus getLocalRoute from '%s'[%u] to '%s'[%u]", src->name().c_str(), src->id(), dst->name().c_str(),
            dst->id());
 
   if (dst->isRouter() || src->isRouter())
@@ -175,7 +175,7 @@ void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg
 
           assert(linkOffset >= 0);
         }
-        XBT_DEBUG("torus_get_route_and_latency - current_node: %i, next_node: %u, linkOffset is %i", current_node,
+        XBT_DEBUG("torus_get_route_and_latency - current_node: %u, next_node: %u, linkOffset is %i", current_node,
                   next_node, linkOffset);
         break;
       }
index 97849e0..8ebb7fa 100644 (file)
@@ -76,7 +76,7 @@ void VivaldiZone::setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, s
 
 void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
 {
-  XBT_DEBUG("vivaldi getLocalRoute from '%s'[%d] '%s'[%d]", src->cname(), src->id(), dst->cname(), dst->id());
+  XBT_DEBUG("vivaldi getLocalRoute from '%s'[%u] '%s'[%u]", src->cname(), src->id(), dst->cname(), dst->id());
 
   if (src->isNetZone()) {
     std::string srcName = "router_" + src->name();
index fad3f3a..6e9bd09 100644 (file)
@@ -67,25 +67,25 @@ static char* print_determinism_result(e_mc_comm_pattern_difference_t diff, int p
 
   switch(diff) {
   case TYPE_DIFF:
-    res = bprintf("%s Different type for communication #%d", type, cursor);
+    res = bprintf("%s Different type for communication #%u", type, cursor);
     break;
   case RDV_DIFF:
-    res = bprintf("%s Different rdv for communication #%d", type, cursor);
+    res = bprintf("%s Different rdv for communication #%u", type, cursor);
     break;
   case TAG_DIFF:
-    res = bprintf("%s Different tag for communication #%d", type, cursor);
+    res = bprintf("%s Different tag for communication #%u", type, cursor);
     break;
   case SRC_PROC_DIFF:
-      res = bprintf("%s Different source for communication #%d", type, cursor);
+    res = bprintf("%s Different source for communication #%u", type, cursor);
     break;
   case DST_PROC_DIFF:
-      res = bprintf("%s Different destination for communication #%d", type, cursor);
+    res = bprintf("%s Different destination for communication #%u", type, cursor);
     break;
   case DATA_SIZE_DIFF:
-    res = bprintf("%s\n Different data size for communication #%d", type, cursor);
+    res = bprintf("%s\n Different data size for communication #%u", type, cursor);
     break;
   case DATA_DIFF:
-    res = bprintf("%s\n Different data for communication #%d", type, cursor);
+    res = bprintf("%s\n Different data for communication #%u", type, cursor);
     break;
   default:
     res = nullptr;
@@ -436,7 +436,7 @@ void CommunicationDeterminismChecker::main()
     simgrid::mc::State* state = stack_.back().get();
 
     XBT_DEBUG("**************************************************");
-    XBT_DEBUG("Exploration depth = %zi (state = %d, interleaved processes = %zd)", stack_.size(), state->num,
+    XBT_DEBUG("Exploration depth = %zu (state = %d, interleaved processes = %zu)", stack_.size(), state->num,
               state->interleaveSize());
 
     /* Update statistics */
@@ -508,13 +508,13 @@ void CommunicationDeterminismChecker::main()
         XBT_DEBUG("State already visited (equal to state %d), exploration stopped on this path.",
             visited_state->original_num == -1 ? visited_state->num : visited_state->original_num);
       else
-        XBT_DEBUG("There are no more processes to interleave. (depth %zi)", stack_.size());
+        XBT_DEBUG("There are no more processes to interleave. (depth %zu)", stack_.size());
 
       if (not this->initial_communications_pattern_done)
         this->initial_communications_pattern_done = 1;
 
       /* Trash the current state, no longer needed */
-      XBT_DEBUG("Delete state %d at depth %zi", state->num, stack_.size());
+      XBT_DEBUG("Delete state %d at depth %zu", state->num, stack_.size());
       stack_.pop_back();
 
       visited_state = nullptr;
@@ -530,16 +530,16 @@ void CommunicationDeterminismChecker::main()
         stack_.pop_back();
         if (state->interleaveSize() && stack_.size() < (std::size_t)_sg_mc_max_depth) {
           /* We found a back-tracking point, let's loop */
-          XBT_DEBUG("Back-tracking to state %d at depth %zi", state->num, stack_.size() + 1);
+          XBT_DEBUG("Back-tracking to state %d at depth %zu", state->num, stack_.size() + 1);
           stack_.push_back(std::move(state));
 
           this->restoreState();
 
-          XBT_DEBUG("Back-tracking to state %d at depth %zi done", stack_.back()->num, stack_.size());
+          XBT_DEBUG("Back-tracking to state %d at depth %zu done", stack_.back()->num, stack_.size());
 
           break;
         } else {
-          XBT_DEBUG("Delete state %d at depth %zi", state->num, stack_.size() + 1);
+          XBT_DEBUG("Delete state %d at depth %zu", state->num, stack_.size() + 1);
         }
       }
     }
index 7cc2f8b..4f3a21a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2015. The SimGrid Team.
+/* Copyright (c) 2011-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -282,7 +282,7 @@ void LivenessChecker::showAcceptanceCycle(std::size_t depth)
   for (auto& s : this->getTextualTrace())
     XBT_INFO("%s", s.c_str());
   simgrid::mc::session->logState();
-  XBT_INFO("Counter-example depth : %zd", depth);
+  XBT_INFO("Counter-example depth : %zu", depth);
 }
 
 std::vector<std::string> LivenessChecker::getTextualTrace() // override
@@ -372,11 +372,10 @@ void LivenessChecker::run()
     /* Update current state in buchi automaton */
     simgrid::mc::property_automaton->current_state = current_pair->automaton_state;
 
-    XBT_DEBUG("********************* ( Depth = %d, search_cycle = %d, interleave size = %zd, pair_num = %d, requests = %d)",
-       current_pair->depth, current_pair->search_cycle,
-       current_pair->graph_state->interleaveSize(),
-       current_pair->num,
-       current_pair->requests);
+    XBT_DEBUG(
+        "********************* ( Depth = %d, search_cycle = %d, interleave size = %zu, pair_num = %d, requests = %d)",
+        current_pair->depth, current_pair->search_cycle, current_pair->graph_state->interleaveSize(), current_pair->num,
+        current_pair->requests);
 
     if (current_pair->requests == 0) {
       this->backtrack();
index 7906265..a48780f 100644 (file)
@@ -97,8 +97,8 @@ void SafetyChecker::run()
     simgrid::mc::State* state = stack_.back().get();
 
     XBT_DEBUG("**************************************************");
-    XBT_DEBUG("Exploration depth=%zi (state=%p, num %d)(%zu interleave)",
-      stack_.size(), state, state->num, state->interleaveSize());
+    XBT_DEBUG("Exploration depth=%zu (state=%p, num %d)(%zu interleave)", stack_.size(), state, state->num,
+              state->interleaveSize());
 
     mc_model_checker->visited_states++;
 
@@ -125,7 +125,7 @@ void SafetyChecker::run()
     // req is now the transition of the process that was selected to be executed
 
     if (req == nullptr) {
-      XBT_DEBUG("There are no more processes to interleave. (depth %zi)", stack_.size() + 1);
+      XBT_DEBUG("There are no more processes to interleave. (depth %zu)", stack_.size() + 1);
 
       this->backtrack();
       continue;
@@ -259,15 +259,13 @@ void SafetyChecker::backtrack()
     if (state->interleaveSize()
         && stack_.size() < (std::size_t) _sg_mc_max_depth) {
       /* We found a back-tracking point, let's loop */
-      XBT_DEBUG("Back-tracking to state %d at depth %zi", state->num, stack_.size() + 1);
+      XBT_DEBUG("Back-tracking to state %d at depth %zu", state->num, stack_.size() + 1);
       stack_.push_back(std::move(state));
       this->restoreState();
-      XBT_DEBUG("Back-tracking to state %d at depth %zi done",
-        stack_.back()->num, stack_.size());
+      XBT_DEBUG("Back-tracking to state %d at depth %zu done", stack_.back()->num, stack_.size());
       break;
     } else {
-      XBT_DEBUG("Delete state %d at depth %zi",
-        state->num, stack_.size() + 1);
+      XBT_DEBUG("Delete state %d at depth %zu", state->num, stack_.size() + 1);
     }
   }
 }
index fabd66b..5a342c6 100644 (file)
@@ -1638,8 +1638,7 @@ int snapshot_compare(int num1, simgrid::mc::Snapshot* s1, int num2, simgrid::mc:
 #else
 
 #ifdef MC_VERBOSE
-      XBT_VERB("(%d - %d) Different local variables between stacks %d", num1,
-               num2, cursor + 1);
+      XBT_VERB("(%d - %d) Different local variables between stacks %u", num1, num2, cursor + 1);
 #endif
 
       return 1;
index 47b5771..e05b628 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2015. The SimGrid Team.
+/* Copyright (c) 2008-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -539,8 +539,7 @@ static void MC_dwarf_fill_member_location(
     // It's supposed to be possible in DWARF2 but I couldn't find its semantic
     // in the spec.
   default:
-    xbt_die("Can't handle form class (%i) / form 0x%x as DW_AT_member_location",
-            (int) form_class, form);
+    xbt_die("Can't handle form class (%d) / form 0x%x as DW_AT_member_location", (int)form_class, (unsigned)form);
   }
 
 }
@@ -790,11 +789,8 @@ static std::unique_ptr<simgrid::mc::Variable> MC_die_to_variable(
     break;
 
   default:
-    xbt_die("Unexpected form 0x%x (%i), class 0x%x (%i) list for location "
-            "in <%" PRIx64 ">%s",
-            form, form, (int) form_class, (int) form_class,
-            (uint64_t) variable->id,
-            variable->name.c_str());
+    xbt_die("Unexpected form 0x%x (%i), class 0x%x (%i) list for location in <%" PRIx64 ">%s", (unsigned)form, form,
+            (unsigned)form_class, (int)form_class, (uint64_t)variable->id, variable->name.c_str());
   }
 
   // Handle start_scope:
@@ -814,9 +810,8 @@ static std::unique_ptr<simgrid::mc::Variable> MC_die_to_variable(
 
     case simgrid::dwarf::FormClass::RangeListPtr:     // TODO
     default:
-      xbt_die
-          ("Unhandled form 0x%x, class 0x%X for DW_AT_start_scope of variable %s",
-           form, (int) form_class, name == nullptr ? "?" : name);
+      xbt_die("Unhandled form 0x%x, class 0x%X for DW_AT_start_scope of variable %s", (unsigned)form,
+              (unsigned)form_class, name == nullptr ? "?" : name);
     }
   }
 
index ce2bfa2..a8dfdb1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -86,7 +86,7 @@ RecordTrace parseRecordTrace(const char* data)
   while (*current) {
 
     simgrid::mc::Transition item;
-    int count = sscanf(current, "%u/%u", &item.pid, &item.argument);
+    int count = sscanf(current, "%d/%d", &item.pid, &item.argument);
     if(count != 2 && count != 1)
       throw std::runtime_error("Could not parse record path");
     res.push_back(item);
index 257ebb4..1cd7efb 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@ void read_element(AddressSpace const& as,
   s_xbt_dynar_t d;
   as.read_bytes(&d, sizeof(d), addr);
   if (i >= d.used)
-    xbt_die("Out of bound index %zi/%lu", i, d.used);
+    xbt_die("Out of bound index %zu/%lu", i, d.used);
   if (len != d.elmsize)
     xbt_die("Bad size in simgrid::mc::read_element");
   as.read_bytes(local, len, remote(xbt_dynar_get_ptr(&d, i)));
index 9bfc523..d6a72a1 100644 (file)
@@ -140,33 +140,33 @@ void Client::handleMessages()
     switch (message->type) {
 
       case MC_MESSAGE_DEADLOCK_CHECK:
-        xbt_assert(received_size == sizeof(mc_message_t), "Unexpected size for DEADLOCK_CHECK (%zu != %zu)",
+        xbt_assert(received_size == sizeof(mc_message_t), "Unexpected size for DEADLOCK_CHECK (%zd != %zu)",
                    received_size, sizeof(mc_message_t));
         handleDeadlockCheck(message);
         break;
 
       case MC_MESSAGE_CONTINUE:
-        xbt_assert(received_size == sizeof(mc_message_t), "Unexpected size for MESSAGE_CONTINUE (%zu != %zu)",
+        xbt_assert(received_size == sizeof(mc_message_t), "Unexpected size for MESSAGE_CONTINUE (%zd != %zu)",
                    received_size, sizeof(mc_message_t));
         handleContinue(message);
         return;
 
       case MC_MESSAGE_SIMCALL_HANDLE:
         xbt_assert(received_size == sizeof(s_mc_message_simcall_handle_t),
-                   "Unexpected size for SIMCALL_HANDLE (%zu != %zu)", received_size,
+                   "Unexpected size for SIMCALL_HANDLE (%zd != %zu)", received_size,
                    sizeof(s_mc_message_simcall_handle_t));
         handleSimcall((s_mc_message_simcall_handle_t*)message_buffer);
         break;
 
       case MC_MESSAGE_RESTORE:
-        xbt_assert(received_size == sizeof(mc_message_t), "Unexpected size for MESSAGE_RESTORE (%zu != %zu)",
+        xbt_assert(received_size == sizeof(mc_message_t), "Unexpected size for MESSAGE_RESTORE (%zd != %zu)",
                    received_size, sizeof(mc_message_t));
         handleRestore((s_mc_message_restore_t*)message_buffer);
         break;
 
       case MC_MESSAGE_ACTOR_ENABLED:
         xbt_assert(received_size == sizeof(s_mc_message_actor_enabled_t),
-                   "Unexpected size for ACTOR_ENABLED (%zu != %zu)", received_size,
+                   "Unexpected size for ACTOR_ENABLED (%zd != %zu)", received_size,
                    sizeof(s_mc_message_actor_enabled_t));
         handleActorEnabled((s_mc_message_actor_enabled_t*)message_buffer);
         break;
index 306421e..3811904 100644 (file)
@@ -427,7 +427,7 @@ void RemoteClient::read_variable(const char* name, void* target, size_t size) co
   simgrid::mc::Variable* var = this->find_variable(name);
   xbt_assert(var->address, "No simple location for this variable");
   xbt_assert(var->type->full_type, "Partial type for %s, cannot check size", name);
-  xbt_assert((size_t)var->type->full_type->byte_size == size, "Unexpected size for %s (expected %zi, was %zi)", name,
+  xbt_assert((size_t)var->type->full_type->byte_size == size, "Unexpected size for %s (expected %zu, was %zu)", name,
              size, (size_t)var->type->full_type->byte_size);
   this->read_bytes(target, size, remote(var->address));
 }
index 827c481..5cf06a0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014. The SimGrid Team.
+/* Copyright (c) 2013-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -91,7 +91,7 @@ void MSG_barrier_destroy(msg_bar_t bar) {
 int MSG_barrier_wait(msg_bar_t bar) {
   xbt_mutex_acquire(bar->mutex);
   bar->arrived_processes++;
-  XBT_DEBUG("waiting %p %d/%d", bar, bar->arrived_processes, bar->expected_processes);
+  XBT_DEBUG("waiting %p %u/%u", bar, bar->arrived_processes, bar->expected_processes);
   if (bar->arrived_processes == bar->expected_processes) {
     xbt_cond_broadcast(bar->cond);
     xbt_mutex_release(bar->mutex);
index 124897c..d00955b 100644 (file)
@@ -127,8 +127,8 @@ static void install_segvhandler()
     return;
   }
   if (not(old_stack.ss_flags & SS_DISABLE)) {
-    XBT_DEBUG("An alternate stack was already installed (sp=%p, size=%zd, flags=%x). Restore it.",
-              old_stack.ss_sp, old_stack.ss_size, old_stack.ss_flags);
+    XBT_DEBUG("An alternate stack was already installed (sp=%p, size=%zu, flags=%x). Restore it.", old_stack.ss_sp,
+              old_stack.ss_size, (unsigned)old_stack.ss_flags);
     sigaltstack(&old_stack, nullptr);
   }
 
index bad673a..66f332c 100644 (file)
@@ -1,5 +1,4 @@
-
-/* Copyright (c) 2007-2015. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -169,7 +168,7 @@ void MutexImpl::unlock(smx_actor_t issuer)
 
   /* If the mutex is not owned by the issuer, that's not good */
   if (issuer != this->owner)
-    THROWF(mismatch_error, 0, "Cannot release that mutex: it was locked by %s (pid:%ld), not by you.",
+    THROWF(mismatch_error, 0, "Cannot release that mutex: it was locked by %s (pid:%lu), not by you.",
            this->owner->cname(), this->owner->pid);
 
   if (xbt_swag_size(this->sleeping) > 0) {
index 3874163..8ae33f0 100644 (file)
@@ -98,8 +98,7 @@ int Coll_allgatherv_ompi_bruck::allgatherv(void *sbuf, int scount,
    unsigned int size = comm->size();
    unsigned int rank = comm->rank();
 
-   XBT_DEBUG(
-                "coll:tuned:allgather_ompi_bruck rank %d", rank);
+   XBT_DEBUG("coll:tuned:allgather_ompi_bruck rank %u", rank);
 
    sdtype->extent(&slb, &sext);
 
index e2a0958..52ad605 100644 (file)
@@ -98,7 +98,7 @@ Coll_bcast_ompi_split_bintree::bcast ( void* buffer,
     else
       segsize = 1024 << 3;
 
-    XBT_DEBUG("ompi_coll_tuned_bcast_intra_split_bintree rank %d root %d ss %5d", rank, root, segsize);
+    XBT_DEBUG("ompi_coll_tuned_bcast_intra_split_bintree rank %d root %d ss %5u", rank, root, segsize);
 
     if (size == 1) {
         return MPI_SUCCESS;
index 25d1cb8..f5d593d 100644 (file)
@@ -68,7 +68,9 @@ int smpi_coll_tuned_ompi_reduce_generic( void* sendbuf, void* recvbuf, int origi
         sendtmpbuf = (char *)recvbuf;
     }
 
-    XBT_DEBUG( "coll:tuned:reduce_generic count %d, msg size %ld, segsize %ld, max_requests %d", original_count, (unsigned long)(num_segments * segment_increment), (unsigned long)segment_increment, max_outstanding_reqs);
+    XBT_DEBUG("coll:tuned:reduce_generic count %d, msg size %lu, segsize %lu, max_requests %d", original_count,
+              (unsigned long)(num_segments * segment_increment), (unsigned long)segment_increment,
+              max_outstanding_reqs);
 
     rank = comm->rank();
 
@@ -335,7 +337,7 @@ int Coll_reduce_ompi_chain::reduce( void *sendbuf, void *recvbuf, int count,
     size_t typelng;
     int fanout = comm->size()/2;
 
-    XBT_DEBUG("coll:tuned:reduce_intra_chain rank %d fo %d ss %5d", comm->rank(), fanout, segsize);
+    XBT_DEBUG("coll:tuned:reduce_intra_chain rank %d fo %d ss %5u", comm->rank(), fanout, segsize);
 
     /**
      * Determine number of segments and number of elements
@@ -386,8 +388,7 @@ int Coll_reduce_ompi_pipeline::reduce( void *sendbuf, void *recvbuf,
         segsize = 64*1024;
     }
 
-    XBT_DEBUG("coll:tuned:reduce_intra_pipeline rank %d ss %5d",
-                 comm->rank(), segsize);
+    XBT_DEBUG("coll:tuned:reduce_intra_pipeline rank %d ss %5u", comm->rank(), segsize);
 
     COLL_TUNED_COMPUTED_SEGCOUNT( segsize, typelng, segcount );
 
@@ -417,8 +418,7 @@ int Coll_reduce_ompi_binary::reduce( void *sendbuf, void *recvbuf,
         // Binary_32K
     segsize = 32*1024;
 
-    XBT_DEBUG("coll:tuned:reduce_intra_binary rank %d ss %5d",
-                 comm->rank(), segsize);
+    XBT_DEBUG("coll:tuned:reduce_intra_binary rank %d ss %5u", comm->rank(), segsize);
 
     COLL_TUNED_COMPUTED_SEGCOUNT( segsize, typelng, segcount );
 
@@ -459,8 +459,7 @@ int Coll_reduce_ompi_binomial::reduce( void *sendbuf, void *recvbuf,
         segsize = 1024;
     }
 
-    XBT_DEBUG("coll:tuned:reduce_intra_binomial rank %d ss %5d",
-                 comm->rank(), segsize);
+    XBT_DEBUG("coll:tuned:reduce_intra_binomial rank %d ss %5u", comm->rank(), segsize);
     COLL_TUNED_COMPUTED_SEGCOUNT( segsize, typelng, segcount );
 
     return smpi_coll_tuned_ompi_reduce_generic( sendbuf, recvbuf, count, datatype,
@@ -491,8 +490,7 @@ int Coll_reduce_ompi_in_order_binary::reduce( void *sendbuf, void *recvbuf,
 
     rank = comm->rank();
     size = comm->size();
-    XBT_DEBUG("coll:tuned:reduce_intra_in_order_binary rank %d ss %5d",
-                 rank, segsize);
+    XBT_DEBUG("coll:tuned:reduce_intra_in_order_binary rank %d ss %5u", rank, segsize);
 
     /**
      * Determine number of segments and number of elements
index a3d9b14..9a1147f 100644 (file)
@@ -135,7 +135,7 @@ void smpi_initialize_global_memory_segments()
     int status;
 
     do {
-      snprintf(path, sizeof(path), "/smpi-buffer-%06x", rand() % 0xffffff);
+      snprintf(path, sizeof(path), "/smpi-buffer-%06x", rand() % 0xffffffU);
       file_descriptor = shm_open(path, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
     } while (file_descriptor == -1 && errno == EEXIST);
     if (file_descriptor < 0) {
index 4ffaea8..742af85 100644 (file)
@@ -24,13 +24,13 @@ extern int* index_to_process_data;
 
 static char *get_mailbox_name(char *str, int index)
 {
-  snprintf(str, MAILBOX_NAME_MAXLEN, "SMPI-%0*x", static_cast<int> (sizeof(int) * 2), index);
+  snprintf(str, MAILBOX_NAME_MAXLEN, "SMPI-%0*x", static_cast<int>(sizeof(int) * 2), static_cast<unsigned>(index));
   return str;
 }
 
 static char *get_mailbox_name_small(char *str, int index)
 {
-  snprintf(str, MAILBOX_NAME_MAXLEN, "small%0*x", static_cast<int> (sizeof(int) * 2), index);
+  snprintf(str, MAILBOX_NAME_MAXLEN, "small%0*x", static_cast<int>(sizeof(int) * 2), static_cast<unsigned>(index));
   return str;
 }
 
index 0d51fb0..a213733 100644 (file)
@@ -306,7 +306,7 @@ void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int
     size_t start_block_offset = ALIGN_UP(start_offset, smpi_shared_malloc_blocksize);
     size_t stop_block_offset = ALIGN_DOWN(stop_offset, smpi_shared_malloc_blocksize);
     for (unsigned block_id=0, i = start_block_offset / smpi_shared_malloc_blocksize; i < stop_block_offset / smpi_shared_malloc_blocksize; block_id++, i++) {
-      XBT_DEBUG("\t\tglobal shared allocation, mmap block offset %d", block_id);
+      XBT_DEBUG("\t\tglobal shared allocation, mmap block offset %u", block_id);
       void* pos = (void*)((unsigned long)mem + i * smpi_shared_malloc_blocksize);
       void* res = mmap(pos, smpi_shared_malloc_blocksize, PROT_READ | PROT_WRITE, mmap_flag,
                        huge_fd, 0);
index e0ef96f..b1a9e09 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016. The SimGrid Team.
+/* Copyright (c) 2016-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
index e5a5706..fc2a5c6 100644 (file)
@@ -32,12 +32,12 @@ int F2C::f2c_id(){
 };
 
 char* F2C::get_key(char* key, int id) {
-  std::snprintf(key, KEY_SIZE, "%x",id);
+  std::snprintf(key, KEY_SIZE, "%x", (unsigned)id);
   return key;
 }
 
 char* F2C::get_key_id(char* key, int id) {
-  std::snprintf(key, KEY_SIZE, "%x_%d",id, smpi_process()->index());
+  std::snprintf(key, KEY_SIZE, "%x_%d", (unsigned)id, smpi_process()->index());
   return key;
 }
 
index 236c577..632c8b9 100644 (file)
@@ -115,7 +115,7 @@ simgrid::kernel::routing::NetPoint* sg_platf_new_router(const char* name, const
 
   simgrid::kernel::routing::NetPoint* netpoint =
       new simgrid::kernel::routing::NetPoint(name, simgrid::kernel::routing::NetPoint::Type::Router, current_routing);
-  XBT_DEBUG("Router '%s' has the id %d", name, netpoint->id());
+  XBT_DEBUG("Router '%s' has the id %u", name, netpoint->id());
 
   if (coords && strcmp(coords, ""))
     new simgrid::kernel::routing::vivaldi::Coords(netpoint, coords);
@@ -702,7 +702,7 @@ void sg_platf_new_hostlink(sg_platf_host_link_cbarg_t hostlink)
   if (as_cluster->privateLinks_.find(netpoint->id()) != as_cluster->privateLinks_.end())
     surf_parse_error("Host_link for '%s' is already defined!",hostlink->id);
 
-  XBT_DEBUG("Push Host_link for host '%s' to position %d", netpoint->cname(), netpoint->id());
+  XBT_DEBUG("Push Host_link for host '%s' to position %u", netpoint->cname(), netpoint->id());
   as_cluster->privateLinks_.insert({netpoint->id(), {linkUp, linkDown}});
 }
 
index 249ee23..07493f0 100644 (file)
@@ -445,9 +445,9 @@ double Model::nextOccuringEvent(double now)
 
 double Model::nextOccuringEventLazy(double now)
 {
-  XBT_DEBUG("Before share resources, the size of modified actions set is %zd", modifiedSet_->size());
+  XBT_DEBUG("Before share resources, the size of modified actions set is %zu", modifiedSet_->size());
   lmm_solve(maxminSystem_);
-  XBT_DEBUG("After share resources, The size of modified actions set is %zd", modifiedSet_->size());
+  XBT_DEBUG("After share resources, The size of modified actions set is %zu", modifiedSet_->size());
 
   while (not modifiedSet_->empty()) {
     Action *action = &(modifiedSet_->front());
index 333f185..24e202c 100644 (file)
@@ -28,7 +28,7 @@ public:
   explicit MockedResource() : simgrid::surf::Resource(nullptr, "fake", nullptr) {}
   void apply_event(tmgr_trace_event_t event, double value)
   {
-    XBT_VERB("t=%.1f: Change value to %lg (idx: %d)", thedate, value, event->idx);
+    XBT_VERB("t=%.1f: Change value to %lg (idx: %u)", thedate, value, event->idx);
     tmgr_trace_event_unref(&event);
   }
   bool isUsed() { return true; }
@@ -59,7 +59,7 @@ static void trace2vector(const char* str, std::vector<tmgr::DatedValue>* whereto
       res->apply_event(it, value);
       whereto->push_back(tmgr::DatedValue(thedate, value));
     } else {
-      XBT_DEBUG("%.1f: ignore an event (idx: %d)\n", thedate, it->idx);
+      XBT_DEBUG("%.1f: ignore an event (idx: %u)\n", thedate, it->idx);
     }
   }
   tmgr_finalize();
index 8760a89..7fa8051 100644 (file)
@@ -166,7 +166,7 @@ std::vector<std::string> resolveBacktrace(
   std::vector<std::string> addrs(count);
   for (std::size_t i = 0; i < count; i++) {
     /* retrieve this address */
-    XBT_DEBUG("Retrieving address number %zd from '%s'", i, backtrace_syms[i]);
+    XBT_DEBUG("Retrieving address number %zu from '%s'", i, backtrace_syms[i]);
     char buff[256];
     snprintf(buff, 256, "%s", strchr(backtrace_syms[i], '[') + 1);
     char* p = strchr(buff, ']');
@@ -175,7 +175,7 @@ std::vector<std::string> resolveBacktrace(
       addrs[i] = buff;
     else
       addrs[i] = "0x0";
-    XBT_DEBUG("Set up a new address: %zd, '%s'", i, addrs[i].c_str());
+    XBT_DEBUG("Set up a new address: %zu, '%s'", i, addrs[i].c_str());
     /* Add it to the command line args */
     stream << addrs[i] << ' ';
   }
@@ -194,17 +194,17 @@ std::vector<std::string> resolveBacktrace(
   char line_func[1024];
   char line_pos[1024];
   for (std::size_t i = 0; i < count; i++) {
-    XBT_DEBUG("Looking for symbol %zd, addr = '%s'", i, addrs[i].c_str());
+    XBT_DEBUG("Looking for symbol %zu, addr = '%s'", i, addrs[i].c_str());
     if (fgets(line_func, 1024, pipe)) {
       line_func[strlen(line_func) - 1] = '\0';
     } else {
-      XBT_VERB("Cannot run fgets to look for symbol %zd, addr %s", i, addrs[i].c_str());
+      XBT_VERB("Cannot run fgets to look for symbol %zu, addr %s", i, addrs[i].c_str());
       strncpy(line_func, "???",3);
     }
     if (fgets(line_pos, 1024, pipe)) {
       line_pos[strlen(line_pos) - 1] = '\0';
     } else {
-      XBT_VERB("Cannot run fgets to look for symbol %zd, addr %s", i, addrs[i].c_str());
+      XBT_VERB("Cannot run fgets to look for symbol %zu, addr %s", i, addrs[i].c_str());
       strncpy(line_pos, backtrace_syms[i],1024);
     }
 
@@ -218,7 +218,7 @@ std::vector<std::string> resolveBacktrace(
       /* Damn. The symbol is in a dynamic library. Let's get wild */
 
       char maps_buff[512];
-      long int offset = 0;
+      unsigned long int offset = 0;
       char* p;
       int found = 0;
 
@@ -226,17 +226,15 @@ std::vector<std::string> resolveBacktrace(
       char* maps_name = bprintf("/proc/%d/maps", (int) getpid());
       FILE* maps = fopen(maps_name, "r");
 
-      long int addr = strtol(addrs[i].c_str(), &p, 16);
+      unsigned long int addr = strtoul(addrs[i].c_str(), &p, 16);
       if (*p != '\0') {
-        XBT_CRITICAL("Cannot parse backtrace address '%s' (addr=%#lx)",
-          addrs[i].c_str(), addr);
+        XBT_CRITICAL("Cannot parse backtrace address '%s' (addr=%#lx)", addrs[i].c_str(), addr);
       }
-      XBT_DEBUG("addr=%s (as string) =%#lx (as number)",
-        addrs[i].c_str(), addr);
+      XBT_DEBUG("addr=%s (as string) =%#lx (as number)", addrs[i].c_str(), addr);
 
       while (not found) {
-        long int first;
-        long int last;
+        unsigned long int first;
+        unsigned long int last;
 
         if (fgets(maps_buff, 512, maps) == nullptr)
           break;
index 6f46820..6a94aae 100644 (file)
@@ -103,7 +103,7 @@ static void xbt_dict_rehash(xbt_dict_t dict)
   newsize--;
   dict->table_size = newsize;
   dict->table = currcell;
-  XBT_DEBUG("REHASH (%d->%d)", oldsize, newsize);
+  XBT_DEBUG("REHASH (%u->%u)", oldsize, newsize);
 
   for (unsigned i = 0; i < oldsize; i++, currcell++) {
     if (*currcell == nullptr) /* empty cell */
index af1dc12..04a4978 100644 (file)
@@ -2,7 +2,7 @@
 /* Used in RL to get win/lin portability, and in SG when CONTEXT_THREAD     */
 /* in SG, when using HAVE_UCONTEXT_CONTEXTS, xbt_os_thread_stub is used instead   */
 
-/* Copyright (c) 2007-2015. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -208,16 +208,16 @@ void xbt_os_thread_setstacksize(int stack_size)
     size_t rem = sz % alignment[i];
     if (rem != 0 || sz == 0) {
       size_t sz2 = sz - rem + alignment[i];
-      XBT_DEBUG("pthread_attr_setstacksize failed for %zd, try again with %zd", sz, sz2);
+      XBT_DEBUG("pthread_attr_setstacksize failed for %zu, try again with %zu", sz, sz2);
       sz = sz2;
       res = pthread_attr_setstacksize(&thread_attr, sz);
     }
   }
 
   if (res == EINVAL)
-    XBT_WARN("invalid stack size (maybe too big): %zd", sz);
+    XBT_WARN("invalid stack size (maybe too big): %zu", sz);
   else if (res != 0)
-    XBT_WARN("unknown error %d in pthread stacksize setting: %zd", res, sz);
+    XBT_WARN("unknown error %d in pthread stacksize setting: %zu", res, sz);
 }
 
 void xbt_os_thread_setguardsize(int guard_size)
@@ -228,7 +228,7 @@ void xbt_os_thread_setguardsize(int guard_size)
   size_t sz = guard_size;
   int res = pthread_attr_setguardsize(&thread_attr, sz);
   if (res)
-    XBT_WARN("pthread_attr_setguardsize failed (%d) for size: %zd", res, sz);
+    XBT_WARN("pthread_attr_setguardsize failed (%d) for size: %zu", res, sz);
 #endif
 }
 
index a064000..9b5bcd2 100644 (file)
@@ -59,7 +59,7 @@ static int commRX(int argc, char *argv[])
   } else if (error==MSG_TRANSFER_FAILURE) {
     XBT_INFO("  Receive message: TRANSFERT_FAILURE");
   } else {
-    XBT_INFO("  Receive message: %d", error);
+    XBT_INFO("  Receive message: %u", error);
   }
   XBT_INFO("  RX Done");
   return 0;
index 6827ed4..430bb73 100644 (file)
@@ -55,38 +55,38 @@ static void sender(std::vector<std::string> args)
 
     switch (args[0][test - 1]) {
       case 'r':
-        XBT_INFO("Test %d: r (regular send)", test);
+        XBT_INFO("Test %u: r (regular send)", test);
         mbox->put((void*)mboxName, 42.0);
         break;
       case 'R':
-        XBT_INFO("Test %d: R (sleep + regular send)", test);
+        XBT_INFO("Test %u: R (sleep + regular send)", test);
         simgrid::s4u::this_actor::sleep_for(0.5);
         mbox->put((void*)mboxName, 42.0);
         break;
 
       case 'i':
-        XBT_INFO("Test %d: i (asynchronous isend)", test);
+        XBT_INFO("Test %u: i (asynchronous isend)", test);
         mbox->put_async((void*)mboxName, 42.0)->wait();
         break;
       case 'I':
-        XBT_INFO("Test %d: I (sleep + isend)", test);
+        XBT_INFO("Test %u: I (sleep + isend)", test);
         simgrid::s4u::this_actor::sleep_for(0.5);
         mbox->put_async((void*)mboxName, 42.0)->wait();
         break;
 
       case 'd':
-        XBT_INFO("Test %d: d (detached send)", test);
+        XBT_INFO("Test %u: d (detached send)", test);
         mbox->put_init((void*)mboxName, 42.0)->detach();
         break;
       case 'D':
-        XBT_INFO("Test %d: D (sleep + detached send)", test);
+        XBT_INFO("Test %u: D (sleep + detached send)", test);
         simgrid::s4u::this_actor::sleep_for(0.5);
         mbox->put_init((void*)mboxName, 42.0)->detach();
         break;
       default:
-        xbt_die("Unknown sender spec for test %d: '%c'", test, args[0][test - 1]);
+        xbt_die("Unknown sender spec for test %u: '%c'", test, args[0][test - 1]);
     }
-    XBT_INFO("Test %d OK", test);
+    XBT_INFO("Test %u OK", test);
   }
   simgrid::s4u::this_actor::sleep_for(0.5);
   // FIXME: we should test what happens when the process ends before the end of remote comm instead of hiding it
@@ -103,54 +103,54 @@ static void receiver(std::vector<std::string> args)
 
     switch (args[0][test - 1]) {
       case 'r':
-        XBT_INFO("Test %d: r (regular receive)", test);
+        XBT_INFO("Test %u: r (regular receive)", test);
         received = mbox->get();
         break;
       case 'R':
-        XBT_INFO("Test %d: R (sleep + regular receive)", test);
+        XBT_INFO("Test %u: R (sleep + regular receive)", test);
         simgrid::s4u::this_actor::sleep_for(0.5);
         received = mbox->get();
         break;
 
       case 'i':
-        XBT_INFO("Test %d: i (asynchronous irecv)", test);
+        XBT_INFO("Test %u: i (asynchronous irecv)", test);
         mbox->get_async(&received)->wait();
         break;
       case 'I':
-        XBT_INFO("Test %d: I (sleep + asynchronous irecv)", test);
+        XBT_INFO("Test %u: I (sleep + asynchronous irecv)", test);
         simgrid::s4u::this_actor::sleep_for(0.5);
         mbox->get_async(&received)->wait();
         break;
       case 'p':
-        XBT_INFO("Test %d: p (regular receive on permanent mailbox)", test);
+        XBT_INFO("Test %u: p (regular receive on permanent mailbox)", test);
         mbox->setReceiver(Actor::self());
         received = mbox->get();
         break;
       case 'P':
-        XBT_INFO("Test %d: P (sleep + regular receive on permanent mailbox)", test);
+        XBT_INFO("Test %u: P (sleep + regular receive on permanent mailbox)", test);
         simgrid::s4u::this_actor::sleep_for(0.5);
         mbox->setReceiver(Actor::self());
         received = mbox->get();
         break;
       case 'j':
-        XBT_INFO("Test %d: j (irecv on permanent mailbox)", test);
+        XBT_INFO("Test %u: j (irecv on permanent mailbox)", test);
         mbox->setReceiver(Actor::self());
         mbox->get_async(&received)->wait();
         break;
       case 'J':
-        XBT_INFO("Test %d: J (sleep + irecv on permanent mailbox)", test);
+        XBT_INFO("Test %u: J (sleep + irecv on permanent mailbox)", test);
         simgrid::s4u::this_actor::sleep_for(0.5);
         mbox->setReceiver(Actor::self());
         mbox->get_async(&received)->wait();
         break;
       default:
-        xbt_die("Unknown receiver spec for test %d: '%c'", test, args[0][test - 1]);
+        xbt_die("Unknown receiver spec for test %u: '%c'", test, args[0][test - 1]);
     }
 
     xbt_assert(strcmp(static_cast<char*>(received), mboxName) == 0);
     xbt_free(received);
     xbt_free(mboxName);
-    XBT_INFO("Test %d OK", test);
+    XBT_INFO("Test %u OK", test);
   }
   simgrid::s4u::this_actor::sleep_for(0.5);
 }
index 39ad856..89d2e05 100644 (file)
@@ -60,9 +60,9 @@ int main(int argc, char **argv)
         if (!rbuf)
             fprintf(stderr, "\trbuf of %d bytes\n", MAX_BUF);
         if (!recvcounts)
-            fprintf(stderr, "\trecvcounts of %zd bytes\n", comm_size * sizeof(int));
+            fprintf(stderr, "\trecvcounts of %zu bytes\n", comm_size * sizeof(int));
         if (!displs)
-            fprintf(stderr, "\tdispls of %zd bytes\n", comm_size * sizeof(int));
+            fprintf(stderr, "\tdispls of %zu bytes\n", comm_size * sizeof(int));
         fflush(stderr);
         MPI_Abort(MPI_COMM_WORLD, -1);
     }
index 9539b95..8dc30ef 100644 (file)
@@ -85,12 +85,10 @@ int main(int argc, char *argv[])
              * this can generate a file that diff, for example,
              * believes is a binary file */
             if (isprint((int) (s1[j].c))) {
-                fprintf(stderr, "Got s[%d].c = %c; expected %c\n",
-                        j, s1[j].c, j + status.MPI_SOURCE + 'a');
+                fprintf(stderr, "Got s[%d].c = %c; expected %c\n", j, s1[j].c, j + status.MPI_SOURCE + 'a');
             }
             else {
-                fprintf(stderr, "Got s[%d].c = %x; expected %c\n",
-                        j, (int) s1[j].c, j + status.MPI_SOURCE + 'a');
+                fprintf(stderr, "Got s[%d].c = %hhx; expected %c\n", j, s1[j].c, j + status.MPI_SOURCE + 'a');
             }
         }
     }
index 9275ef1..40fed30 100644 (file)
@@ -35,8 +35,7 @@ int main(int argc, char *argv[])
         if (MPI_LONG_DOUBLE != MPI_DATATYPE_NULL) {
             MPI_Type_size(MPI_LONG_DOUBLE, &type_size);
             if (type_size != sizeof(long double)) {
-                printf("type_size != sizeof(long double) : (%d != %zd)\n",
-                       type_size, sizeof(long double));
+                printf("type_size != sizeof(long double) : (%d != %zu)\n", type_size, sizeof(long double));
                 ++errs;
             }
         }
@@ -45,8 +44,8 @@ int main(int argc, char *argv[])
         if (MPI_C_LONG_DOUBLE_COMPLEX != MPI_DATATYPE_NULL) {
             MPI_Type_size(MPI_C_LONG_DOUBLE_COMPLEX, &type_size);
             if (type_size != sizeof(long double _Complex)) {
-                printf("type_size != sizeof(long double _Complex) : (%d != %zd)\n",
-                       type_size, sizeof(long double _Complex));
+                printf("type_size != sizeof(long double _Complex) : (%d != %zu)\n", type_size,
+                       sizeof(long double _Complex));
                 ++errs;
             }
         }
index 14c5725..6ff46d2 100644 (file)
@@ -93,7 +93,7 @@ int main(int argc, char **argv)
                             myname, j, world_rank, errloc - 1);
                     p1 = (char *) inbufs[j];
                     p2 = (char *) outbufs[j];
-                    fprintf(stderr, "Got %x expected %x\n", p1[errloc - 1], p2[errloc - 1]);
+                    fprintf(stderr, "Got %hhx expected %hhx\n", p1[errloc - 1], p2[errloc - 1]);
                     err++;
                 }
             }
index 7191e15..8e60c20 100644 (file)
@@ -361,7 +361,7 @@ static int MtestDatatype2CheckAndPrint(void *inbuf, void *outbuf, int size_bytes
                 typename, typenum, world_rank, errloc - 1, size_bytes);
         p1 = (char *) inbuf;
         p2 = (char *) outbuf;
-        fprintf(stderr, "Got %x expected %x\n", p2[errloc - 1], p1[errloc - 1]);
+        fprintf(stderr, "Got %hhx expected %hhx\n", p2[errloc - 1], p1[errloc - 1]);
     }
     return errloc;
 }
index 6d115ab..a002dc0 100644 (file)
@@ -185,10 +185,10 @@ int main(int argc, char **argv)
   float mean_date= acc_date/(float)testcount;
   float stdev_date= sqrt(acc_date2/(float)testcount-mean_date*mean_date);
 
-  fprintf(stderr,
-         "%ix One shot execution time for a total of %d constraints, "
-         "%d variables with %d active constraint each, concurrency in [%i,%i] and max concurrency share %i\n",
-         testcount,nb_cnst, nb_var, nb_elem, (1<<pw_base_limit), (1<<pw_base_limit)+(1<<pw_max_limit), max_share);
+  fprintf(stderr, "%ix One shot execution time for a total of %u constraints, "
+                  "%u variables with %u active constraint each, concurrency in [%i,%i] and max concurrency share %u\n",
+          testcount, nb_cnst, nb_var, nb_elem, (1 << pw_base_limit), (1 << pw_base_limit) + (1 << pw_max_limit),
+          max_share);
   if(mode==3)
     fprintf(stderr, "Execution time: %g +- %g  microseconds \n",mean_date, stdev_date);
 
index 569c756..759f09e 100644 (file)
@@ -45,7 +45,7 @@ int main(int argc, char**argv)
   for (i = 0; i < TESTSIZE; i++) {
     size = size_of_block(i);
     pointers[i] = mmalloc(heapA, size);
-    XBT_INFO("%d bytes allocated with offset %tx", size, ((char*)pointers[i])-((char*)heapA));
+    XBT_INFO("%d bytes allocated with offset %zx", size, (size_t)((char*)pointers[i] - (char*)heapA));
   }
   XBT_INFO("All blocks were correctly allocated. Free every second block");
   for (i = 0; i < TESTSIZE; i+=2) {