Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce the visibility of stdio.h because it was loaded wrongly (ie, before _GNU_SOURC...
[simgrid.git] / src / xbt / config.c
index 7e96cb8..a640310 100644 (file)
@@ -9,6 +9,7 @@
 /* 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. */
 
+#include <stdio.h>
 #include "xbt/misc.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
@@ -662,7 +663,7 @@ xbt_cfg_set_int(xbt_cfg_t cfg,const char*name, int val) {
           
     xbt_dynar_set(variable->content,0,&val);
   } else {
-    if (variable->max && xbt_dynar_length(variable->content) == variable->max)
+    if (variable->max && xbt_dynar_length(variable->content) == (unsigned long)variable->max)
       THROW3(mismatch_error,0,
              "Cannot add value %d to the config element %s since it's already full (size=%d)",
              val,name,variable->max); 
@@ -1201,8 +1202,6 @@ XBT_TEST_UNIT("validation",test_config_validation,"Validation tests") {
 }
 
 XBT_TEST_UNIT("use",test_config_use,"Data retrieving tests") {
-  xbt_cfg_t set = set=make_set();
 
   xbt_test_add0("Get a single value");
   {