Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make g++ happy
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 19 Oct 2005 14:28:53 +0000 (14:28 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 19 Oct 2005 14:28:53 +0000 (14:28 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1760 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/xbt/dynar.h
src/xbt/dynar.c
src/xbt/ex.c
src/xbt/log.c

index 2f42603..2b5fa44 100644 (file)
@@ -89,7 +89,7 @@ SG_BEGIN_DECL()
   void xbt_dynar_pop     (xbt_dynar_t dynar, void *const dst);
   void xbt_dynar_unshift (xbt_dynar_t dynar, const void *src);
   void xbt_dynar_shift   (xbt_dynar_t dynar, void *const dst);
   void xbt_dynar_pop     (xbt_dynar_t dynar, void *const dst);
   void xbt_dynar_unshift (xbt_dynar_t dynar, const void *src);
   void xbt_dynar_shift   (xbt_dynar_t dynar, void *const dst);
-  void xbt_dynar_map            (const xbt_dynar_t dynar, void_f_pvoid_t *operator);
+  void xbt_dynar_map     (const xbt_dynar_t dynar, void_f_pvoid_t *op);
 
 /** @} */
 /** @name 3. Manipulating pointers to the content
 
 /** @} */
 /** @name 3. Manipulating pointers to the content
index b231ea1..aece933 100644 (file)
@@ -52,7 +52,7 @@ _xbt_dynar_expand(xbt_dynar_t const dynar,
   const unsigned long old_size    = dynar->size;
 
   if (nb > old_size) {
   const unsigned long old_size    = dynar->size;
 
   if (nb > old_size) {
-    char * const old_data    = dynar->data;
+    char * const old_data    = (char *) dynar->data;
 
     const unsigned long elmsize     = dynar->elmsize;
     const unsigned long old_length  = old_size*elmsize;
 
     const unsigned long elmsize     = dynar->elmsize;
     const unsigned long old_length  = old_size*elmsize;
@@ -62,7 +62,7 @@ _xbt_dynar_expand(xbt_dynar_t const dynar,
 
     const unsigned long new_size    = nb > (2*(old_size+1)) ? nb : (2*(old_size+1));
     const unsigned long new_length  = new_size*elmsize;
 
     const unsigned long new_size    = nb > (2*(old_size+1)) ? nb : (2*(old_size+1));
     const unsigned long new_length  = new_size*elmsize;
-    char * const new_data    = xbt_malloc0(elmsize*new_size);
+    char * const new_data    = (char *) xbt_malloc0(elmsize*new_size);
 
     DEBUG3("expend %p from %lu to %d elements", (void*)dynar, (unsigned long)old_size, nb);
 
 
     DEBUG3("expend %p from %lu to %d elements", (void*)dynar, (unsigned long)old_size, nb);
 
@@ -83,7 +83,7 @@ static _XBT_INLINE
 void *
 _xbt_dynar_elm(const xbt_dynar_t  dynar,
                const unsigned long idx) {
 void *
 _xbt_dynar_elm(const xbt_dynar_t  dynar,
                const unsigned long idx) {
-  char * const data    = dynar->data;
+  char * const data    = (char*) dynar->data;
   const unsigned long elmsize = dynar->elmsize;
 
   return data + idx*elmsize;
   const unsigned long elmsize = dynar->elmsize;
 
   return data + idx*elmsize;
@@ -459,7 +459,7 @@ xbt_dynar_shift(xbt_dynar_t  const dynar,
  */
 void
 xbt_dynar_map(const xbt_dynar_t  dynar,
  */
 void
 xbt_dynar_map(const xbt_dynar_t  dynar,
-               void_f_pvoid_t     * const operator) {
+               void_f_pvoid_t     * const op) {
 
   __sanity_check_dynar(dynar);
 
 
   __sanity_check_dynar(dynar);
 
@@ -470,7 +470,7 @@ xbt_dynar_map(const xbt_dynar_t  dynar,
 
     for (i = 0; i < used; i++) {
       _xbt_dynar_get_elm(elm, dynar, i);
 
     for (i = 0; i < used; i++) {
       _xbt_dynar_get_elm(elm, dynar, i);
-      operator(elm);
+      op(elm);
     }
   }
 }
     }
   }
 }
index 5a9ad01..7e53f12 100644 (file)
@@ -56,7 +56,7 @@ void xbt_ex_display(xbt_ex_t *e)  {
 #ifdef HAVE_EXECINFO_H
  {
   char **strings;
 #ifdef HAVE_EXECINFO_H
  {
   char **strings;
-  size_t i;
+  int i;
 
   fprintf(stderr,"** Backtrace:\n");
   strings = backtrace_symbols (e->bt, e->used);
 
   fprintf(stderr,"** Backtrace:\n");
   strings = backtrace_symbols (e->bt, e->used);
index 3cf1ceb..e80332a 100644 (file)
@@ -13,6 +13,7 @@
 #include <stdio.h> /* snprintf */
 #include <stdlib.h> /* snprintf */
 #include "gras_config.h" /* to get a working stdarg.h */
 #include <stdio.h> /* snprintf */
 #include <stdlib.h> /* snprintf */
 #include "gras_config.h" /* to get a working stdarg.h */
+#include "portable.h" /* to get a working stdarg.h */
 
 #include "xbt_modinter.h"
 
 
 #include "xbt_modinter.h"
 
@@ -547,7 +548,7 @@ static void _xbt_log_parse_setting(const char*        control_string,
   xbt_assert1(*dot == '.' && *eq == '=',
               "Invalid control string '%s'",control_string);
 
   xbt_assert1(*dot == '.' && *eq == '=',
               "Invalid control string '%s'",control_string);
 
-  if (!strncmp(dot + 1, "thresh", min(eq - dot - 1,strlen("thresh")))) {
+  if (!strncmp(dot + 1, "thresh", min((size_t)(eq - dot - 1),strlen("thresh")))) {
     int i;
     char *neweq=xbt_strdup(eq+1);
     char *p=neweq-1;
     int i;
     char *neweq=xbt_strdup(eq+1);
     char *p=neweq-1;
@@ -566,7 +567,7 @@ static void _xbt_log_parse_setting(const char*        control_string,
       }
     }
     if (i<xbt_log_priority_infinite-1) {
       }
     }
     if (i<xbt_log_priority_infinite-1) {
-      set->thresh=i;
+      set->thresh= (e_xbt_log_priority_t) i;
     } else {
       xbt_assert1(FALSE,"Unknown priority name: %s",eq+1);
     }
     } else {
       xbt_assert1(FALSE,"Unknown priority name: %s",eq+1);
     }