Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s/_XBT_GNUC/XBT_ATTRIB/ as we will port them to MSVC
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 17 Sep 2015 15:49:59 +0000 (17:49 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 17 Sep 2015 15:49:59 +0000 (17:49 +0200)
42 files changed:
doc/msg-tuto-src/masterworker0.c
doc/msg-tuto-src/masterworker1.c
doc/msg-tuto-src/masterworker2.c
doc/msg-tuto-src/masterworker3.c
doc/msg-tuto-src/masterworker4.c
examples/msg/icomms/peer.c
examples/msg/icomms/peer2.c
examples/msg/icomms/peer3.c
examples/msg/masterslave/masterslave_arg.c
examples/msg/masterslave/masterslave_bypass.c
examples/msg/masterslave/masterslave_cluster.c
examples/msg/masterslave/masterslave_failure.c
examples/msg/masterslave/masterslave_forwarder.c
examples/msg/masterslave/masterslave_mailbox.c
examples/msg/parallel_task/test_ptask.c
examples/msg/priority/priority.c
examples/msg/properties/msg_prop.c
examples/msg/token_ring/ring_call.c
examples/msg/token_ring/token_bypass.c
examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c
include/surf/surfxml_parse.h
include/xbt/base.h
include/xbt/cunit.h
include/xbt/dynar.h
include/xbt/log.h
include/xbt/misc.h
include/xbt/sysdep.h
src/bindings/java/smx_context_java.c
src/bindings/lua/lua_state_cloner.c
src/bindings/lua/simgrid_lua.c
src/simdag/sd_daxloader.c
src/simix/smx_deployment.c
src/surf/surfxml_parse.c
src/surf/vm_hl13.cpp
src/xbt/dict.c
src/xbt/ex.c
src/xbt/graph.c
src/xbt/graphxml_parse.c
teshsuite/msg/host_on_off/host_on_off.c
teshsuite/msg/pid/pid.c
teshsuite/msg/storage/storage_basic.c
teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c

index 665cba9..3526b42 100644 (file)
@@ -33,7 +33,7 @@ int master(int argc, char *argv[])
 
   int i;
 
 
   int i;
 
-  _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%d", &number_of_tasks);
+  XBT_ATTRIB_UNUSED int res = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
@@ -95,7 +95,7 @@ int master(int argc, char *argv[])
 int worker(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int worker(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   while (1) {
     res = MSG_task_receive(&(task),MSG_host_get_name(MSG_host_self()));
     xbt_assert(res == MSG_OK, "MSG_task_receive failed");
   while (1) {
     res = MSG_task_receive(&(task),MSG_host_get_name(MSG_host_self()));
     xbt_assert(res == MSG_OK, "MSG_task_receive failed");
index f4da400..2d44af8 100644 (file)
@@ -44,7 +44,7 @@ int master(int argc, char *argv[])
 
   int i;
 
 
   int i;
 
-  _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%d", &number_of_tasks);
+  XBT_ATTRIB_UNUSED int res = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
@@ -110,7 +110,7 @@ int master(int argc, char *argv[])
 int worker(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int worker(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   char channel[1024];
 
   build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
   char channel[1024];
 
   build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
index b8cdc8d..4ac7469 100644 (file)
@@ -44,7 +44,7 @@ int master(int argc, char *argv[])
 
   int i;
 
 
   int i;
 
-  _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%lg", &timeout);
+  XBT_ATTRIB_UNUSED int res = sscanf(argv[1], "%lg", &timeout);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
@@ -107,7 +107,7 @@ int master(int argc, char *argv[])
 int worker(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int worker(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   char channel[1024];
 
   build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
   char channel[1024];
 
   build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
index 85f16da..75f351d 100644 (file)
@@ -46,7 +46,7 @@ int master(int argc, char *argv[])
 
   TRACE_category(master_name);
 
 
   TRACE_category(master_name);
 
-  _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%lg", &timeout);
+  XBT_ATTRIB_UNUSED int res = sscanf(argv[1], "%lg", &timeout);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
@@ -110,7 +110,7 @@ int master(int argc, char *argv[])
 int worker(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int worker(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   char channel[1024];
 
   build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
   char channel[1024];
 
   build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
index 68ae6ee..c50a067 100644 (file)
@@ -46,7 +46,7 @@ int master(int argc, char *argv[])
 
   TRACE_category(master_name);
 
 
   TRACE_category(master_name);
 
-  _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%lg", &timeout);
+  XBT_ATTRIB_UNUSED int res = sscanf(argv[1], "%lg", &timeout);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
@@ -136,7 +136,7 @@ int master(int argc, char *argv[])
 int worker(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int worker(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   char channel[1024];
 
   const char *my_master = MSG_process_get_data(MSG_process_self());
   char channel[1024];
 
   const char *my_master = MSG_process_get_data(MSG_process_self());
index f35d0af..1251630 100644 (file)
@@ -97,7 +97,7 @@ int sender(int argc, char *argv[])
 int receiver(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int receiver(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED msg_error_t res;
+  XBT_ATTRIB_UNUSED msg_error_t res;
   int id = -1;
   char mailbox[80];
   msg_comm_t res_irecv;
   int id = -1;
   char mailbox[80];
   msg_comm_t res_irecv;
@@ -106,7 +106,7 @@ int receiver(int argc, char *argv[])
   XBT_INFO("sleep_start_time : %f , sleep_test_time : %f", sleep_start_time,
         sleep_test_time);
 
   XBT_INFO("sleep_start_time : %f , sleep_test_time : %f", sleep_start_time,
         sleep_test_time);
 
-  _XBT_GNUC_UNUSED int read;
+  XBT_ATTRIB_UNUSED int read;
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read,
               "Invalid argument %s\n", argv[1]);
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read,
               "Invalid argument %s\n", argv[1]);
index 758fae5..22c4aff 100644 (file)
@@ -69,11 +69,11 @@ int sender(int argc, char *argv[])
 int receiver(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int receiver(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED msg_error_t res;
+  XBT_ATTRIB_UNUSED msg_error_t res;
   int id = -1;
   char mailbox[80];
   msg_comm_t res_irecv;
   int id = -1;
   char mailbox[80];
   msg_comm_t res_irecv;
-  _XBT_GNUC_UNUSED int read;
+  XBT_ATTRIB_UNUSED int read;
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
   MSG_process_sleep(10);
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
   MSG_process_sleep(10);
index c3fea50..154fa9d 100644 (file)
@@ -69,7 +69,7 @@ int sender(int argc, char *argv[])
   sprintf(mailbox, "finalize");
 
   msg_comm_t res_irecv;
   sprintf(mailbox, "finalize");
 
   msg_comm_t res_irecv;
-  _XBT_GNUC_UNUSED msg_error_t res_wait;
+  XBT_ATTRIB_UNUSED msg_error_t res_wait;
   for (i = 0; i < receivers_count; i++) {
     task = NULL;
     res_irecv = MSG_task_irecv(&(task), mailbox);
   for (i = 0; i < receivers_count; i++) {
     task = NULL;
     res_irecv = MSG_task_irecv(&(task), mailbox);
@@ -93,7 +93,7 @@ int receiver(int argc, char *argv[])
   int tasks = atof(argv[2]);
   msg_task_t *task = xbt_new(msg_task_t, tasks);
 
   int tasks = atof(argv[2]);
   msg_task_t *task = xbt_new(msg_task_t, tasks);
 
-  _XBT_GNUC_UNUSED int read;
+  XBT_ATTRIB_UNUSED int read;
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
   sprintf(mailbox, "receiver-%d", id);
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
   sprintf(mailbox, "receiver-%d", id);
@@ -109,7 +109,7 @@ int receiver(int argc, char *argv[])
   /* Here we are waiting for the receiving of all communications */
   msg_task_t task_com;
   while (!xbt_dynar_is_empty(comms)) {
   /* Here we are waiting for the receiving of all communications */
   msg_task_t task_com;
   while (!xbt_dynar_is_empty(comms)) {
-    _XBT_GNUC_UNUSED msg_error_t err;
+    XBT_ATTRIB_UNUSED msg_error_t err;
     xbt_dynar_remove_at(comms, MSG_comm_waitany(comms), &res_irecv);
     task_com = MSG_comm_get_task(res_irecv);
     MSG_comm_destroy(res_irecv);
     xbt_dynar_remove_at(comms, MSG_comm_waitany(comms), &res_irecv);
     task_com = MSG_comm_get_task(res_irecv);
     MSG_comm_destroy(res_irecv);
index 19b76d5..27f1602 100644 (file)
@@ -67,7 +67,7 @@ int master(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
 
   XBT_DEBUG("mailbox: %s",MSG_process_get_name(MSG_process_self()));
   while (1) {
 
   XBT_DEBUG("mailbox: %s",MSG_process_get_name(MSG_process_self()));
   while (1) {
index bb54684..1ff3e3a 100644 (file)
@@ -165,7 +165,7 @@ int master(int argc, char *argv[])
   double task_comp_size = 0;
   double task_comm_size = 0;
   int i;
   double task_comp_size = 0;
   double task_comm_size = 0;
   int i;
-  _XBT_GNUC_UNUSED int read;
+  XBT_ATTRIB_UNUSED int read;
 
   read = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
 
   read = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
index 6d1bba8..e6bc021 100644 (file)
@@ -32,7 +32,7 @@ int master(int argc, char *argv[])
   double task_comp_size = 0;
   double task_comm_size = 0;
   int i;
   double task_comp_size = 0;
   double task_comm_size = 0;
   int i;
-  _XBT_GNUC_UNUSED int read;
+  XBT_ATTRIB_UNUSED int read;
 
   read = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
 
   read = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
index 0e9d2fb..ce4eec9 100644 (file)
@@ -30,7 +30,7 @@ int master(int argc, char *argv[])
   double task_comp_size = 0;
   double task_comm_size = 0;
   int i;
   double task_comp_size = 0;
   double task_comm_size = 0;
   int i;
-  _XBT_GNUC_UNUSED int read;
+  XBT_ATTRIB_UNUSED int read;
 
   read = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
 
   read = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
index 7b2c01e..01e1eb7 100644 (file)
@@ -43,7 +43,7 @@ int master(int argc, char *argv[])
 
   int i;
 
 
   int i;
 
-  _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%d", &number_of_tasks);
+  XBT_ATTRIB_UNUSED int res = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
@@ -107,7 +107,7 @@ int master(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   while (1) {
     res = MSG_task_receive(&(task),MSG_host_get_name(MSG_host_self()));
     xbt_assert(res == MSG_OK, "MSG_task_get failed");
   while (1) {
     res = MSG_task_receive(&(task),MSG_host_get_name(MSG_host_self()));
     xbt_assert(res == MSG_OK, "MSG_task_get failed");
index 16d2efc..7a5ddbb 100644 (file)
@@ -65,10 +65,10 @@ int master(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   int id = -1;
   char mailbox[80];
   int id = -1;
   char mailbox[80];
-  _XBT_GNUC_UNUSED int read;
+  XBT_ATTRIB_UNUSED int read;
 
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
 
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
index 382555e..1618944 100644 (file)
@@ -43,7 +43,7 @@ int execute(int argc, char *argv[])
                 "Unknown host %s. Stopping Now! ", argv[i]);
   }
 
                 "Unknown host %s. Stopping Now! ", argv[i]);
   }
 
-  _XBT_GNUC_UNUSED int read;
+  XBT_ATTRIB_UNUSED int read;
   read = sscanf(argv[argc - 2], "%lg", &computation_amount);
   xbt_assert(read, "Invalid argument %s\n", argv[argc - 2]);
   read = sscanf(argv[argc - 1], "%lg", &communication_amount);
   read = sscanf(argv[argc - 2], "%lg", &computation_amount);
   xbt_assert(read, "Invalid argument %s\n", argv[argc - 2]);
   read = sscanf(argv[argc - 1], "%lg", &communication_amount);
@@ -99,7 +99,7 @@ int redistribute(int argc, char *argv[])
                 "Unknown host %s. Stopping Now! ", argv[i]);
   }
 
                 "Unknown host %s. Stopping Now! ", argv[i]);
   }
 
-  _XBT_GNUC_UNUSED int read;
+  XBT_ATTRIB_UNUSED int read;
   read = sscanf(argv[argc - 1], "%lg", &communication_amount);
   xbt_assert(read, "Invalid argument %s\n", argv[argc - 1]);
   computation_duration = (double *) calloc(host_list_size, sizeof(double));
   read = sscanf(argv[argc - 1], "%lg", &communication_amount);
   xbt_assert(read, "Invalid argument %s\n", argv[argc - 1]);
   computation_duration = (double *) calloc(host_list_size, sizeof(double));
index bd7ad2b..f1efaa6 100644 (file)
@@ -28,7 +28,7 @@ static int test(int argc, char *argv[])
   double priority = 1.0;
   msg_task_t task = NULL;
 
   double priority = 1.0;
   msg_task_t task = NULL;
 
-  _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%lg", &computation_amount);
+  XBT_ATTRIB_UNUSED int res = sscanf(argv[1], "%lg", &computation_amount);
   xbt_assert(res, "Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &priority);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
   xbt_assert(res, "Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &priority);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
index 37a2dd4..c77494e 100644 (file)
@@ -99,7 +99,7 @@ int bob(int argc, char *argv[])
   xbt_dict_cursor_t cursor = NULL;
   char *key, *data;
   const char *noexist = "UnknownProcessProp";
   xbt_dict_cursor_t cursor = NULL;
   char *key, *data;
   const char *noexist = "UnknownProcessProp";
-  _XBT_GNUC_UNUSED const char *value;
+  XBT_ATTRIB_UNUSED const char *value;
 
   XBT_INFO("== Print the properties of the process");
   xbt_dict_foreach(props, cursor, key, data)
 
   XBT_INFO("== Print the properties of the process");
   xbt_dict_foreach(props, cursor, key, data)
index dbe653d..5b7a39d 100644 (file)
@@ -33,7 +33,7 @@ int host(int argc, char *argv[])
   int host_number = atoi(MSG_process_get_name(MSG_process_self()));
   char mailbox[256];
   msg_task_t task = NULL;
   int host_number = atoi(MSG_process_get_name(MSG_process_self()));
   char mailbox[256];
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   if (host_number == 0){ //master  send then receive
     sprintf(mailbox, "%d", host_number+1);
     task = MSG_task_create("Token", task_comp_size, task_comm_size, NULL);
   if (host_number == 0){ //master  send then receive
     sprintf(mailbox, "%d", host_number+1);
     task = MSG_task_create("Token", task_comp_size, task_comm_size, NULL);
index c36d023..99002a2 100644 (file)
@@ -30,7 +30,7 @@ int host(int argc, char *argv[])
   int host_number = atoi(MSG_process_get_name(MSG_process_self()));
   char mailbox[256];
   msg_task_t task = NULL;
   int host_number = atoi(MSG_process_get_name(MSG_process_self()));
   char mailbox[256];
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   if (host_number == 0){ //master  send then receive
     sprintf(mailbox, "%d", host_number+1);
     task = MSG_task_create("Token", task_comp_size, task_comm_size, NULL);
   if (host_number == 0){ //master  send then receive
     sprintf(mailbox, "%d", host_number+1);
     task = MSG_task_create("Token", task_comp_size, task_comm_size, NULL);
index 3f704d6..d5681b9 100644 (file)
@@ -113,10 +113,10 @@ int alltoall_mpi(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   int id = -1;
   char mailbox[80];
   int id = -1;
   char mailbox[80];
-  _XBT_GNUC_UNUSED int read;
+  XBT_ATTRIB_UNUSED int read;
 
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
 
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
index de4fe26..a5b6696 100644 (file)
@@ -26,8 +26,8 @@ XBT_PUBLIC(void) surf_parse_close(void);
 XBT_PUBLIC(void) surf_parse_init_callbacks(void);
 XBT_PUBLIC(void) surf_parse_reset_callbacks(void);
 XBT_PUBLIC(void) surf_parse_free_callbacks(void);
 XBT_PUBLIC(void) surf_parse_init_callbacks(void);
 XBT_PUBLIC(void) surf_parse_reset_callbacks(void);
 XBT_PUBLIC(void) surf_parse_free_callbacks(void);
-XBT_PUBLIC(void) surf_parse_error(const char *msg,...) _XBT_GNUC_PRINTF(1,2) _XBT_GNUC_NORETURN;
-XBT_PUBLIC(void) surf_parse_warn(const char *msg,...) _XBT_GNUC_PRINTF(1,2);
+XBT_PUBLIC(void) surf_parse_error(const char *msg,...) XBT_ATTRIB_PRINTF(1,2) XBT_ATTRIB_NORETURN;
+XBT_PUBLIC(void) surf_parse_warn(const char *msg,...) XBT_ATTRIB_PRINTF(1,2);
 XBT_PUBLIC(double) surf_parse_get_double(const char *string);
 XBT_PUBLIC(int) surf_parse_get_int(const char *string);
 XBT_PUBLIC(double) surf_parse_get_time(const char *string);
 XBT_PUBLIC(double) surf_parse_get_double(const char *string);
 XBT_PUBLIC(int) surf_parse_get_int(const char *string);
 XBT_PUBLIC(double) surf_parse_get_time(const char *string);
index ae3f926..d9d4ac2 100644 (file)
 #endif
 
 #if defined(__MINGW32__) && defined(__MINGW_PRINTF_FORMAT)
 #endif
 
 #if defined(__MINGW32__) && defined(__MINGW_PRINTF_FORMAT)
-  # define _XBT_GNUC_PRINTF( format_idx, arg_idx )    \
+  # define XBT_ATTRIB_PRINTF( format_idx, arg_idx )    \
      __attribute__((__format__ (__MINGW_PRINTF_FORMAT, format_idx, arg_idx)))
 #else
      __attribute__((__format__ (__MINGW_PRINTF_FORMAT, format_idx, arg_idx)))
 #else
-  # define _XBT_GNUC_PRINTF( format_idx, arg_idx )    \
+  # define XBT_ATTRIB_PRINTF( format_idx, arg_idx )    \
      __attribute__((__format__ (__printf__, format_idx, arg_idx)))
 #endif
 
 #if defined(__MINGW32__) && defined(__MINGW_SCANF_FORMAT)
      __attribute__((__format__ (__printf__, format_idx, arg_idx)))
 #endif
 
 #if defined(__MINGW32__) && defined(__MINGW_SCANF_FORMAT)
-  # define _XBT_GNUC_SCANF( format_idx, arg_idx )     \
+  # define XBT_ATTRIB_SCANF( format_idx, arg_idx )     \
          __attribute__((__MINGW_SCANF_FORMAT (__scanf__, format_idx, arg_idx)))
 #else
          __attribute__((__MINGW_SCANF_FORMAT (__scanf__, format_idx, arg_idx)))
 #else
-  # define _XBT_GNUC_SCANF( format_idx, arg_idx )     \
+  # define XBT_ATTRIB_SCANF( format_idx, arg_idx )     \
          __attribute__((__format__ (__scanf__, format_idx, arg_idx)))
 #endif
 
          __attribute__((__format__ (__scanf__, format_idx, arg_idx)))
 #endif
 
-# define _XBT_GNUC_NORETURN __attribute__((__noreturn__))
-# define _XBT_GNUC_UNUSED  __attribute__((__unused__))
+# define XBT_ATTRIB_NORETURN __attribute__((__noreturn__))
+# define XBT_ATTRIB_UNUSED  __attribute__((__unused__))
 
 /* Constructor priorities exist since gcc 4.3.  Apparently, they are however not
  * supported on Macs. */
 
 /* Constructor priorities exist since gcc 4.3.  Apparently, they are however not
  * supported on Macs. */
 # undef _XBT_NEED_INIT_PRAGMA
 
 #else                           /* !__GNUC__ */
 # undef _XBT_NEED_INIT_PRAGMA
 
 #else                           /* !__GNUC__ */
-# define _XBT_GNUC_PRINTF( format_idx, arg_idx )
-# define _XBT_GNUC_SCANF( format_idx, arg_idx )
-# define _XBT_GNUC_NORETURN
-# define _XBT_GNUC_UNUSED
+# define XBT_ATTRIB_PRINTF( format_idx, arg_idx )
+# define XBT_ATTRIB_SCANF( format_idx, arg_idx )
+# define XBT_ATTRIB_NORETURN
+# define XBT_ATTRIB_UNUSED
 # define _XBT_GNUC_CONSTRUCTOR(prio)
 # define _XBT_GNUC_DESTRUCTOR(prio)
 # define  _XBT_NEED_INIT_PRAGMA 1
 # define _XBT_GNUC_CONSTRUCTOR(prio)
 # define _XBT_GNUC_DESTRUCTOR(prio)
 # define  _XBT_NEED_INIT_PRAGMA 1
index 37df800..7a3c876 100644 (file)
@@ -124,12 +124,12 @@ XBT_PUBLIC(void) xbt_test_exit(void);
 
 /* test operations */
 XBT_PUBLIC(void) _xbt_test_add(const char *file, int line, const char *fmt,
 
 /* test operations */
 XBT_PUBLIC(void) _xbt_test_add(const char *file, int line, const char *fmt,
-                               ...) _XBT_GNUC_PRINTF(3, 4);
+                               ...) XBT_ATTRIB_PRINTF(3, 4);
 XBT_PUBLIC(void) _xbt_test_fail(const char *file, int line,
 XBT_PUBLIC(void) _xbt_test_fail(const char *file, int line,
-                                const char *fmt, ...) _XBT_GNUC_PRINTF(3,
+                                const char *fmt, ...) XBT_ATTRIB_PRINTF(3,
                                                                        4);
 XBT_PUBLIC(void) _xbt_test_log(const char *file, int line, const char *fmt,
                                                                        4);
 XBT_PUBLIC(void) _xbt_test_log(const char *file, int line, const char *fmt,
-                               ...) _XBT_GNUC_PRINTF(3, 4);
+                               ...) XBT_ATTRIB_PRINTF(3, 4);
 /** @brief Declare that a new test begins (printf-like parameters, describing the test) 
  *  @hideinitializer */
 #define xbt_test_add(...)       _xbt_test_add(__FILE__, __LINE__, __VA_ARGS__)
 /** @brief Declare that a new test begins (printf-like parameters, describing the test) 
  *  @hideinitializer */
 #define xbt_test_add(...)       _xbt_test_add(__FILE__, __LINE__, __VA_ARGS__)
index 4ca03cc..007926e 100644 (file)
@@ -228,7 +228,7 @@ typedef struct xbt_dynar_s {
 } s_xbt_dynar_t;
 
 static XBT_INLINE void
 } s_xbt_dynar_t;
 
 static XBT_INLINE void
-_xbt_dynar_cursor_first(const xbt_dynar_t dynar _XBT_GNUC_UNUSED,
+_xbt_dynar_cursor_first(const xbt_dynar_t dynar XBT_ATTRIB_UNUSED,
                         unsigned int *const cursor)
 {
   /* iterating over a NULL dynar is a no-op (but we don't want to have uninitialized counters) */
                         unsigned int *const cursor)
 {
   /* iterating over a NULL dynar is a no-op (but we don't want to have uninitialized counters) */
index 240096d..85f5951 100644 (file)
@@ -348,7 +348,7 @@ XBT_PUBLIC(xbt_log_appender_t) xbt_log_appender2_file_new(char *arg,int roll);
 /* ********************************** */
 XBT_PUBLIC(void) _xbt_log_event_log(xbt_log_event_t ev,
                                     const char *fmt,
 /* ********************************** */
 XBT_PUBLIC(void) _xbt_log_event_log(xbt_log_event_t ev,
                                     const char *fmt,
-                                    ...) _XBT_GNUC_PRINTF(2, 3);
+                                    ...) XBT_ATTRIB_PRINTF(2, 3);
 
 XBT_PUBLIC(int) _xbt_log_cat_init(xbt_log_category_t category,
                                   e_xbt_log_priority_t priority);
 
 XBT_PUBLIC(int) _xbt_log_cat_init(xbt_log_category_t category,
                                   e_xbt_log_priority_t priority);
index 87dbc48..e1e454b 100644 (file)
@@ -51,7 +51,7 @@ XBT_PUBLIC_DATA(xbt_dynar_t) sg_cmdline;
  */
 #if defined(SIMGRID_NEED_ASPRINTF)||defined(DOXYGEN)
 XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt,   /*args */
  */
 #if defined(SIMGRID_NEED_ASPRINTF)||defined(DOXYGEN)
 XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt,   /*args */
-                         ...) _XBT_GNUC_PRINTF(2, 3);
+                         ...) XBT_ATTRIB_PRINTF(2, 3);
 #endif
 /** @brief print to allocated string (reimplemented when not provided by the system)
  *
 #endif
 /** @brief print to allocated string (reimplemented when not provided by the system)
  *
@@ -72,7 +72,7 @@ XBT_PUBLIC(char *) bvprintf(const char *fmt, va_list ap);
  * Works just like asprintf(), but returns a pointer to the newly
  * created string, or aborts on error.
  */
  * Works just like asprintf(), but returns a pointer to the newly
  * created string, or aborts on error.
  */
-XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2);
+XBT_PUBLIC(char *) bprintf(const char *fmt, ...) XBT_ATTRIB_PRINTF(1, 2);
 /** @} */
 
 SG_END_DECL()
 /** @} */
 
 SG_END_DECL()
index bffd706..5f3caff 100644 (file)
@@ -35,7 +35,7 @@ SG_BEGIN_DECL()
  * @{
  */
 /** @brief Kill the program in silence */
  * @{
  */
 /** @brief Kill the program in silence */
-XBT_PUBLIC(void) xbt_abort(void) _XBT_GNUC_NORETURN;
+XBT_PUBLIC(void) xbt_abort(void) XBT_ATTRIB_NORETURN;
 
 /**
  * @brief Kill the program with an error message
 
 /**
  * @brief Kill the program with an error message
@@ -64,10 +64,10 @@ XBT_LOG_EXTERNAL_CATEGORY(xbt);
    not need to load the whole str.h and its heavy dependencies */
 #ifndef __USE_GNU               /* do not redeclare existing headers */
 XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt,   /*args */
    not need to load the whole str.h and its heavy dependencies */
 #ifndef __USE_GNU               /* do not redeclare existing headers */
 XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt,   /*args */
-                         ...) _XBT_GNUC_PRINTF(2, 3);
+                         ...) XBT_ATTRIB_PRINTF(2, 3);
 XBT_PUBLIC(int) vasprintf(char **ptr, const char *fmt, va_list ap);
 #endif
 XBT_PUBLIC(int) vasprintf(char **ptr, const char *fmt, va_list ap);
 #endif
-XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2);
+XBT_PUBLIC(char *) bprintf(const char *fmt, ...) XBT_ATTRIB_PRINTF(1, 2);
 
 /** @addtogroup XBT_syscall
  *  @brief Malloc and associated functions, killing the program on error (with \ref XBT_ex)
 
 /** @addtogroup XBT_syscall
  *  @brief Malloc and associated functions, killing the program on error (with \ref XBT_ex)
index 29489d1..6d7206d 100644 (file)
@@ -97,7 +97,7 @@ static void* smx_ctx_java_thread_run(void *data) {
   xbt_os_thread_set_extra_data(context);
   //Attach the thread to the JVM
   JNIEnv *env;
   xbt_os_thread_set_extra_data(context);
   //Attach the thread to the JVM
   JNIEnv *env;
-  _XBT_GNUC_UNUSED jint error = (*__java_vm)->AttachCurrentThread(__java_vm, (void **) &env, NULL);
+  XBT_ATTRIB_UNUSED jint error = (*__java_vm)->AttachCurrentThread(__java_vm, (void **) &env, NULL);
   xbt_assert((error == JNI_OK), "The thread could not be attached to the JVM");
   context->jenv = get_current_thread_env();
   //Wait for the first scheduling round to happen.
   xbt_assert((error == JNI_OK), "The thread could not be attached to the JVM");
   context->jenv = get_current_thread_env();
   //Wait for the first scheduling round to happen.
@@ -168,7 +168,7 @@ void smx_ctx_java_stop(smx_context_t context)
     /* detach the thread and kills it */
     JNIEnv *env = ctx_java->jenv;
     (*env)->DeleteGlobalRef(env,ctx_java->jprocess);
     /* detach the thread and kills it */
     JNIEnv *env = ctx_java->jenv;
     (*env)->DeleteGlobalRef(env,ctx_java->jprocess);
-    _XBT_GNUC_UNUSED jint error = (*__java_vm)->DetachCurrentThread(__java_vm);
+    XBT_ATTRIB_UNUSED jint error = (*__java_vm)->DetachCurrentThread(__java_vm);
     xbt_assert((error == JNI_OK), "The thread couldn't be detached.");
     xbt_os_sem_release(((smx_ctx_java_t)context)->end);
     xbt_os_thread_exit(NULL);
     xbt_assert((error == JNI_OK), "The thread couldn't be detached.");
     xbt_os_sem_release(((smx_ctx_java_t)context)->end);
     xbt_os_thread_exit(NULL);
index 5128ec5..93d8271 100644 (file)
@@ -465,7 +465,7 @@ static void sglua_copy_function(lua_State* src, lua_State* dst) {
     buffer.data = xbt_new(char, buffer.capacity);
 
     /* copy the binary chunk from src into a buffer */
     buffer.data = xbt_new(char, buffer.capacity);
 
     /* copy the binary chunk from src into a buffer */
-    _XBT_GNUC_UNUSED int error = lua_dump(src, sglua_memory_writer, &buffer);
+    XBT_ATTRIB_UNUSED int error = lua_dump(src, sglua_memory_writer, &buffer);
     xbt_assert(!error, "Failed to dump the function from the source state: error %d",
         error);
     XBT_DEBUG("Fonction dumped: %zu bytes", buffer.size);
     xbt_assert(!error, "Failed to dump the function from the source state: error %d",
         error);
     XBT_DEBUG("Fonction dumped: %zu bytes", buffer.size);
index 438ba57..f15d691 100644 (file)
@@ -333,7 +333,7 @@ static int run_lua_code(int argc, char **argv)
     lua_pushstring(L, argv[i]);
 
   /* call the function */
     lua_pushstring(L, argv[i]);
 
   /* call the function */
-  _XBT_GNUC_UNUSED int err;
+  XBT_ATTRIB_UNUSED int err;
   err = lua_pcall(L, argc - 1, 1, 0);
   xbt_assert(err == 0, "Error running function `%s': %s", argv[0],
               lua_tostring(L, -1));
   err = lua_pcall(L, argc - 1, 1, 0);
   xbt_assert(err == 0, "Error running function `%s': %s", argv[0],
               lua_tostring(L, -1));
index 16af27a..5eefa8e 100644 (file)
@@ -381,7 +381,7 @@ xbt_dynar_t SD_daxload(const char *filename)
 
 void STag_dax__adag(void)
 {
 
 void STag_dax__adag(void)
 {
-  _XBT_GNUC_UNUSED double version;
+  XBT_ATTRIB_UNUSED double version;
   version = dax_parse_double(A_dax__adag_version);
 
   xbt_assert(version == 2.1,
   version = dax_parse_double(A_dax__adag_version);
 
   xbt_assert(version == 2.1,
index bb3b90b..da7cb74 100644 (file)
@@ -114,7 +114,7 @@ void SIMIX_init_application(void){
  */
 void SIMIX_launch_application(const char *file)
 {
  */
 void SIMIX_launch_application(const char *file)
 {
-  _XBT_GNUC_UNUSED int parse_status;
+  XBT_ATTRIB_UNUSED int parse_status;
   xbt_assert(simix_global,
               "SIMIX_global_init has to be called before SIMIX_launch_application.");
 
   xbt_assert(simix_global,
               "SIMIX_global_init has to be called before SIMIX_launch_application.");
 
index 306050c..4764cb9 100644 (file)
@@ -374,7 +374,7 @@ void surf_parse_free_callbacks(void)
 /* Stag and Etag parse functions */
 
 void STag_surfxml_platform(void) {
 /* Stag and Etag parse functions */
 
 void STag_surfxml_platform(void) {
-  _XBT_GNUC_UNUSED double version = surf_parse_get_double(A_surfxml_platform_version);
+  XBT_ATTRIB_UNUSED double version = surf_parse_get_double(A_surfxml_platform_version);
 
   xbt_assert((version >= 1.0), "******* BIG FAT WARNING *********\n "
       "You're using an ancient XML file.\n"
 
   xbt_assert((version >= 1.0), "******* BIG FAT WARNING *********\n "
       "You're using an ancient XML file.\n"
index 8936dae..acb25b8 100644 (file)
@@ -62,10 +62,10 @@ double VMHL13Model::shareResources(double now)
   /* 0. Make sure that we already calculated the resource share at the physical
    * machine layer. */
   {
   /* 0. Make sure that we already calculated the resource share at the physical
    * machine layer. */
   {
-    _XBT_GNUC_UNUSED Model *ws_model = surf_host_model;
-    _XBT_GNUC_UNUSED Model *vm_ws_model = surf_vm_model;
-    _XBT_GNUC_UNUSED unsigned int index_of_pm_ws_model = xbt_dynar_search(model_list_invoke, &ws_model);
-    _XBT_GNUC_UNUSED unsigned int index_of_vm_ws_model = xbt_dynar_search(model_list_invoke, &vm_ws_model);
+    XBT_ATTRIB_UNUSED Model *ws_model = surf_host_model;
+    XBT_ATTRIB_UNUSED Model *vm_ws_model = surf_vm_model;
+    XBT_ATTRIB_UNUSED unsigned int index_of_pm_ws_model = xbt_dynar_search(model_list_invoke, &ws_model);
+    XBT_ATTRIB_UNUSED unsigned int index_of_vm_ws_model = xbt_dynar_search(model_list_invoke, &vm_ws_model);
     xbt_assert((index_of_pm_ws_model < index_of_vm_ws_model), "Cannot assume surf_host_model comes before");
 
     /* Another option is that we call sub_ws->share_resource() here. The
     xbt_assert((index_of_pm_ws_model < index_of_vm_ws_model), "Cannot assume surf_host_model comes before");
 
     /* Another option is that we call sub_ws->share_resource() here. The
@@ -260,7 +260,7 @@ VMHL13::VMHL13(VMModel *model, const char* name, xbt_dict_t props,
 VMHL13::~VMHL13()
 {
   /* Free the cpu_action of the VM. */
 VMHL13::~VMHL13()
 {
   /* Free the cpu_action of the VM. */
-  _XBT_GNUC_UNUSED int ret = p_action->unref();
+  XBT_ATTRIB_UNUSED int ret = p_action->unref();
   xbt_assert(ret == 1, "Bug: some resource still remains");
 }
 
   xbt_assert(ret == 1, "Bug: some resource still remains");
 }
 
@@ -369,7 +369,7 @@ void VMHL13::migrate(surf_resource_t ind_dst_pm)
        new_cpu_action->setBound(old_bound);
      }
 
        new_cpu_action->setBound(old_bound);
      }
 
-     _XBT_GNUC_UNUSED int ret = p_action->unref();
+     XBT_ATTRIB_UNUSED int ret = p_action->unref();
      xbt_assert(ret == 1, "Bug: some resource still remains");
 
      p_action = new_cpu_action;
      xbt_assert(ret == 1, "Bug: some resource still remains");
 
      p_action = new_cpu_action;
index d7e8765..674b7b4 100644 (file)
@@ -824,7 +824,7 @@ static void count_check_get_key(xbt_dict_t dict, int length)
 {
   xbt_dict_cursor_t cursor;
   char *key;
 {
   xbt_dict_cursor_t cursor;
   char *key;
-  _XBT_GNUC_UNUSED char *key2;
+  XBT_ATTRIB_UNUSED char *key2;
   void *data;
   int effective = 0;
 
   void *data;
   int effective = 0;
 
index 0cd35b8..e6bbedb 100644 (file)
@@ -333,7 +333,7 @@ XBT_TEST_UNIT("variables", test_variables, "variable value preservation")
 {
   xbt_ex_t ex;
   int r1;
 {
   xbt_ex_t ex;
   int r1;
-  int _XBT_GNUC_UNUSED r2;
+  int XBT_ATTRIB_UNUSED r2;
   int v1;
   volatile int v2;
 
   int v1;
   volatile int v2;
 
index a0d6538..1db1686 100644 (file)
@@ -627,7 +627,7 @@ xbt_graph_t xbt_graph_read(const char *filename,
   ETag_graphxml_edge_fun = __parse_edge;
 
   xbt_graph_parse_open(filename);
   ETag_graphxml_edge_fun = __parse_edge;
 
   xbt_graph_parse_open(filename);
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   res = xbt_graph_parse();
   xbt_assert(!res, "Parse error in %s", filename);
   xbt_graph_parse_close();
   res = xbt_graph_parse();
   xbt_assert(!res, "Parse error in %s", filename);
   xbt_graph_parse_close();
index d143e32..4f7605d 100644 (file)
@@ -123,7 +123,7 @@ int_f_void_t xbt_graph_parse = _xbt_graph_parse;
 double xbt_graph_parse_get_double(const char *string)
 {
   double result;
 double xbt_graph_parse_get_double(const char *string)
 {
   double result;
-  _XBT_GNUC_UNUSED int ret = 0;
+  XBT_ATTRIB_UNUSED int ret = 0;
 
   ret = sscanf(string, "%lg", &result);
   xbt_assert((ret == 1), "Parse error line %d : %s not a number",
 
   ret = sscanf(string, "%lg", &result);
   xbt_assert((ret == 1), "Parse error line %d : %s not a number",
index 2c5727e..9d6544d 100644 (file)
@@ -75,7 +75,7 @@ int master(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   int id = -1;
   char mailbox[80];
 
   int id = -1;
   char mailbox[80];
 
index f2e200a..8542e30 100644 (file)
@@ -32,7 +32,7 @@ static int sendpid(int argc, char *argv[])
 
 static int killall(int argc, char *argv[]){
   msg_task_t task = NULL;
 
 static int killall(int argc, char *argv[]){
   msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   int i;
   for (i=0; i<3;i++) {
     res = MSG_task_receive(&(task), mailbox);
   int i;
   for (i=0; i<3;i++) {
     res = MSG_task_receive(&(task), mailbox);
index 83046c1..63f322d 100644 (file)
@@ -168,7 +168,7 @@ int client(int argc, char *argv[])
 int server(int argc, char *argv[])
 {
   msg_task_t to_execute = NULL;
 int server(int argc, char *argv[])
 {
   msg_task_t to_execute = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
 
   storage_info(MSG_host_self());
 
 
   storage_info(MSG_host_self());
 
index 048e817..cc9ea1c 100644 (file)
@@ -94,7 +94,7 @@ static int worker_main(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
   msg_task_t task;
 int slave(int argc, char *argv[])
 {
   msg_task_t task;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
   int id = -1;
   char mailbox[80];
   double start, end;
   int id = -1;
   char mailbox[80];
   double start, end;