Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cast is mandatory here.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 21 Feb 2012 15:50:00 +0000 (16:50 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 21 Feb 2012 15:50:00 +0000 (16:50 +0100)
src/msg/msg_actions.c
src/simix/smx_deployment.c

index 4218ab1..92f9288 100644 (file)
@@ -56,7 +56,8 @@ static int MSG_action_runner(int argc, char *argv[])
   if (action_fp) {              // A unique trace file
 
     while ((evt = action_get_action(argv[0]))) {
-      msg_action_fun function = xbt_dict_get(action_funs, evt[1]);
+      msg_action_fun function =
+        (msg_action_fun)xbt_dict_get(action_funs, evt[1]);
       function(evt);
       free(evt);
     }
@@ -69,7 +70,8 @@ static int MSG_action_runner(int argc, char *argv[])
     xbt_replay_trace_reader_t reader = xbt_replay_trace_reader_new(argv[1]);
     while ((evt=xbt_replay_trace_reader_get(reader))) {
       if (!strcmp(argv[0],evt[0])) {
-        msg_action_fun function = xbt_dict_get(action_funs, evt[1]);
+        msg_action_fun function =
+          (msg_action_fun)xbt_dict_get(action_funs, evt[1]);
         function(evt);
         free(evt);
       } else {
index f5187d4..511e695 100644 (file)
@@ -177,7 +177,7 @@ xbt_main_func_t SIMIX_get_registered_function(const char *name)
   xbt_assert(simix_global,
               "SIMIX_global_init has to be called before SIMIX_get_registered_function.");
 
-  res = xbt_dict_get_or_null(simix_global->registered_functions, name);
+  res = (xbt_main_func_t)xbt_dict_get_or_null(simix_global->registered_functions, name);
   return res ? res : default_function;
 }