Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix to handle warnings+optimizations on CI [#15544]
authorPaul Bédaride <paul.bedaride@gmail.com>
Mon, 6 May 2013 12:36:15 +0000 (14:36 +0200)
committerPaul Bédaride <paul.bedaride@gmail.com>
Mon, 6 May 2013 12:36:15 +0000 (14:36 +0200)
include/surf/surfxml_parse.h
src/bindings/java/smx_context_cojava.c
src/simdag/sd_dotloader.c

index 3564ab7..ee4b4d9 100644 (file)
@@ -24,6 +24,10 @@ XBT_PUBLIC(void) surf_parse_error(const char *msg,...) _XBT_GNUC_PRINTF(1,2) _XB
 XBT_PUBLIC(void) surf_parse_warn(const char *msg,...) _XBT_GNUC_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_bandwidth(const char *string);
+XBT_PUBLIC(double) surf_parse_get_power(const char *string);
+
 /* Prototypes of the functions offered by flex */
 XBT_PUBLIC(int) surf_parse_lex(void);
 XBT_PUBLIC(int) surf_parse_get_lineno(void);
index 5e135f2..6ecaca1 100644 (file)
@@ -264,7 +264,8 @@ static void smx_ctx_cojava_create_coroutine(smx_ctx_cojava_t context) {
      FILE *conf= fopen("/proc/sys/vm/max_map_count","r");
      if (conf) {
        int limit=-1;
-       fscanf(conf,"%d",&limit);
+        if(!fscanf(conf,"%d",&limit))
+           xbt_die("Error while creating a new coroutine. Parse error.");
        fclose(conf);
        if (limit!=-1 && SIMIX_process_count() > (limit - 100) /2)
           xbt_die("Error while creating a new coroutine. "
index 29c7b94..7842834 100644 (file)
@@ -170,7 +170,7 @@ xbt_dynar_t SD_dotload_generic(const char * filename, seq_par_t seq_or_par){
 
     char *name = agnameof(node);
     double amount = atof(agget(node, (char *) "size"));
-    double alpha;
+    double alpha = 0.0;
 
     if (seq_or_par == sequential){
       XBT_DEBUG("See <job id=%s amount =%.0f>", name, amount);