Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This change allow to avoid the Visual C++ compiler Warning that occur when you try...
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 6 Nov 2007 12:38:11 +0000 (12:38 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 6 Nov 2007 12:38:11 +0000 (12:38 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4980 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/DataDesc/ddt_exchange.c
src/gras/Msg/gras_msg_mod.c
src/gras/Msg/timer.c
src/gras/Transport/transport.c
src/gras/Virtu/process.c
src/surf/trace_mgr.c
src/xbt/cunit.c
src/xbt/set.c

index e0d59d1..3f3015f 100644 (file)
@@ -198,7 +198,7 @@ gras_datadesc_memcpy_rec(gras_cbps_t           state,
                "union field selector of %s gave a negative value", 
                type->name);
     
-    xbt_assert3(field_num < xbt_dynar_length(union_data.fields),
+    xbt_assert3(field_num < (int)xbt_dynar_length(union_data.fields),
         "union field selector of %s returned %d but there is only %lu fields",
                 type->name, field_num, xbt_dynar_length(union_data.fields));
     
@@ -472,7 +472,7 @@ gras_datadesc_send_rec(gras_socket_t         sock,
                 "union field selector of %s gave a negative value", 
                 type->name);
     
-    xbt_assert3(field_num < xbt_dynar_length(union_data.fields),
+    xbt_assert3(field_num < (int)xbt_dynar_length(union_data.fields),
         "union field selector of %s returned %d but there is only %lu fields",
                 type->name, field_num, xbt_dynar_length(union_data.fields));
 
@@ -723,7 +723,7 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
     if (field_num < 0)
       THROW1(mismatch_error,0,
             "Received union field for %s is negative", type->name);
-    if (field_num > xbt_dynar_length(union_data.fields)) 
+    if (field_num > (int)xbt_dynar_length(union_data.fields)) 
       THROW3(mismatch_error,0,
             "Received union field for %s is said to be #%d but there is only %lu fields",
             type->name, field_num, xbt_dynar_length(union_data.fields));
index 2ae723f..185a07e 100644 (file)
@@ -19,7 +19,7 @@ extern xbt_set_t _gras_msgtype_set;
 /*
  * Creating procdata for this module
  */
-static void *gras_msg_procdata_new() {
+static void *gras_msg_procdata_new(void) {
    gras_msg_procdata_t res = xbt_new(s_gras_msg_procdata_t,1);
    
    res->name = xbt_strdup("gras_msg");
index 0c6aa5b..1249840 100644 (file)
@@ -141,7 +141,7 @@ double gras_msg_timer_handle(void) {
   double now=gras_os_time();
   double untilnext = -1.0;
   
-  for (cursor=0; cursor < xbt_dynar_length(pd->timers); cursor++) {
+  for (cursor=0; cursor < (int)xbt_dynar_length(pd->timers); cursor++) {
      double untilthis;
      
      timer = xbt_dynar_get_ptr (pd->timers, cursor);
index ad39c5c..21d7e23 100644 (file)
@@ -349,7 +349,7 @@ void gras_socket_close(gras_socket_t sock) {
   if (sock) {
        /* FIXME: Cannot get the dynar mutex, because it can be already locked */
 //             _xbt_dynar_foreach(sockets,cursor,sock_iter) {
-               for (cursor=0; cursor< xbt_dynar_length(sockets); cursor++)  {
+               for (cursor=0; cursor< (int)xbt_dynar_length(sockets); cursor++)  {
                        _xbt_dynar_cursor_get(sockets,&cursor,&sock_iter);
                        if (sock == sock_iter) {
                                DEBUG2("remove sock cursor %d dize %lu\n",cursor,xbt_dynar_length(sockets));
@@ -558,7 +558,7 @@ gras_socket_t gras_socket_meas_accept(gras_socket_t peer){
 /*
  * Creating procdata for this module
  */
-static void *gras_trp_procdata_new() {
+static void *gras_trp_procdata_new(void) {
    gras_trp_procdata_t res = xbt_new(s_gras_trp_procdata_t,1);
    
    res->name = xbt_strdup("gras_trp");
index 0e1050d..a978ba3 100644 (file)
@@ -122,7 +122,7 @@ gras_procdata_init() {
   xbt_dynar_foreach(_gras_procdata_fabrics,cursor,fab){ 
     volatile int found = 0;
      
-    if (cursor+1 <= xbt_set_length(pd->libdata)) {
+    if (cursor+1 <= (int)xbt_set_length(pd->libdata)) {
        DEBUG2("Skip fabric %d: there is already %ld libdata",
             cursor, xbt_set_length(pd->libdata));
        continue; /* allow to recall this function to get recently added fabrics */
index a00896d..9d199f7 100644 (file)
@@ -142,7 +142,7 @@ tmgr_trace_event_t tmgr_history_add_trace(tmgr_history_t h,
   trace_event->idx = offset;
   trace_event->model = model;
 
-  xbt_assert0((trace_event->idx < xbt_dynar_length(trace->event_list)),
+  xbt_assert0((trace_event->idx < (int)xbt_dynar_length(trace->event_list)),
              "You're refering to an event that does not exist!");
 
   xbt_heap_push(h->heap, trace_event, start_time);
@@ -180,7 +180,7 @@ tmgr_trace_event_t tmgr_history_get_next_event_leq(tmgr_history_t h,
   *value = event->value;
   *model = trace_event->model;
 
-  if (trace_event->idx < xbt_dynar_length(trace->event_list) - 1) {
+  if (trace_event->idx < (int)xbt_dynar_length(trace->event_list) - 1) {
     xbt_heap_push(h->heap, trace_event, event_date + event->delta);
     trace_event->idx++;
   } else if (event->delta > 0) {       /* Last element, checking for periodicity */
index 40e8fd7..a1718c9 100644 (file)
@@ -493,7 +493,7 @@ static void apply_selection(char *selection) {
       }
     } else {
       int it;
-      for (it=0; it<xbt_dynar_length(_xbt_test_suites); it++) {
+      for (it=0; it< (int)xbt_dynar_length(_xbt_test_suites); it++) {
        xbt_test_suite_t thissuite=xbt_dynar_get_as(_xbt_test_suites,it,xbt_test_suite_t);
        if (!strcmp(suitename,thissuite->name)) {
          /* Do not disable the whole suite when we just want to disable a child */
@@ -507,7 +507,7 @@ static void apply_selection(char *selection) {
          } else { /* act on one child only */
            int it2_unit;
            /* search it, first (we won't reuse it for external loop which gets broken) */
-           for (it2_unit=0; it2_unit<xbt_dynar_length(thissuite->units); it2_unit++) {
+           for (it2_unit=0; it2_unit< (int)xbt_dynar_length(thissuite->units); it2_unit++) {
              xbt_test_unit_t thisunit=xbt_dynar_get_as(thissuite->units,it2_unit,xbt_test_unit_t);
              if (!strcmp(thisunit->name,unitname)) {
                thisunit->enabled = enabling;
index 4230a6c..609ecd6 100644 (file)
@@ -265,7 +265,7 @@ void         xbt_set_cursor_step        (xbt_set_cursor_t cursor) {
   do {
     cursor->val++;
   }
-  while (cursor->val < xbt_dynar_length(dynar) &&
+  while (cursor->val < (int)xbt_dynar_length(dynar) &&
         xbt_dynar_get_ptr(dynar, cursor->val) == NULL);
 }
 
@@ -282,7 +282,7 @@ int          xbt_set_cursor_get_or_free (xbt_set_cursor_t *curs,
 
   cursor=*curs;
 
-  if (cursor->val >= xbt_dynar_length(cursor->set->dynar)) {
+  if (cursor->val >= (int)xbt_dynar_length(cursor->set->dynar)) {
     free(cursor);
     *curs=NULL;
     return FALSE;