Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Catch up with the lastest API breakage
[simgrid.git] / src / xbt / log.c
index 555de65..e84d50f 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 "portable.h" /* to get a working stdarg.h */
 
 #include "xbt_modinter.h"
 
@@ -46,6 +47,7 @@
  - \ref log_internals
    - \ref log_in_perf
    - \ref log_in_app
+ - \ref XBT_log_cats
      
 \section log_overview 1. Introduction
 
@@ -546,7 +548,7 @@ static void _xbt_log_parse_setting(const char*        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;
@@ -565,7 +567,7 @@ static void _xbt_log_parse_setting(const char*        control_string,
       }
     }
     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);
     }
@@ -685,7 +687,7 @@ void xbt_log_control_set(const char* control_string) {
     } CATCH(e) {
       if (e.category != not_found_error)
        RETHROW;
-      xbt_ex_free(e);
+      xbt_ex_free(&e);
       found = 0;
 
       DEBUG0("Store for further application");