Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to avoid to mix enum with anything else.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 21 Feb 2012 15:50:01 +0000 (16:50 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 21 Feb 2012 15:50:01 +0000 (16:50 +0100)
src/include/surf/surf_resource_lmm.h
src/surf/network.c
src/xbt/config.c

index 4f7eb94..992f70d 100644 (file)
@@ -20,7 +20,7 @@ static XBT_INLINE
                                               lmm_system_t system,
                                               double constraint_value,
                                               tmgr_history_t history,
                                               lmm_system_t system,
                                               double constraint_value,
                                               tmgr_history_t history,
-                                              int state_init,
+                                              e_surf_resource_state_t state_init,
                                               tmgr_trace_t state_trace,
                                               double metric_peak,
                                               tmgr_trace_t metric_trace)
                                               tmgr_trace_t state_trace,
                                               double metric_peak,
                                               tmgr_trace_t metric_trace)
index 0da4bbf..af6e1ed 100644 (file)
@@ -80,7 +80,7 @@ static void heap_insert(surf_action_network_CM02_t    action, double key, enum h
 }
 
 static void heap_remove(surf_action_network_CM02_t action){
 }
 
 static void heap_remove(surf_action_network_CM02_t action){
-  action->hat = NONE;
+  action->hat = NOTSET;
   if(((surf_action_network_CM02_t) action)->index_heap >= 0){
       xbt_heap_remove(net_action_heap,action->index_heap);
   }
   if(((surf_action_network_CM02_t) action)->index_heap >= 0){
       xbt_heap_remove(net_action_heap,action->index_heap);
   }
index 39b4262..23b3dfc 100644 (file)
@@ -326,7 +326,7 @@ void xbt_cfg_register_str(xbt_cfg_t * cfg, const char *entry)
               "; Should be <name>:<min nb>_to_<max nb>_<type>");
   tok++;
 
               "; Should be <name>:<min nb>_to_<max nb>_<type>");
   tok++;
 
-  for (type = 0;
+  for (type = (e_xbt_cfgelm_type_t)0;
        type < xbt_cfgelm_type_count
        && strcmp(tok, xbt_cfgelm_type_name[type]); type++);
   xbt_assert(type < xbt_cfgelm_type_count,
        type < xbt_cfgelm_type_count
        && strcmp(tok, xbt_cfgelm_type_name[type]); type++);
   xbt_assert(type < xbt_cfgelm_type_count,
@@ -509,7 +509,7 @@ void xbt_cfg_set_vargs(xbt_cfg_t cfg, const char *name, va_list pa)
   char *str;
   int i;
   double d;
   char *str;
   int i;
   double d;
-  e_xbt_cfgelm_type_t type = 0; /* Set a dummy value to make gcc happy. It cannot get uninitialized */
+  e_xbt_cfgelm_type_t type = xbt_cfgelm_any; /* Set a dummy value to make gcc happy. It cannot get uninitialized */
 
   xbt_ex_t e;
 
 
   xbt_ex_t e;