From: Arnaud Giersch Date: Tue, 21 Feb 2012 15:50:00 +0000 (+0100) Subject: Cast is mandatory here. X-Git-Tag: exp_20120308~34^2~12 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/598bcf2b304c5f1ae949aaa3fd9676886961f39f Cast is mandatory here. --- diff --git a/src/msg/msg_actions.c b/src/msg/msg_actions.c index 4218ab18f5..92f9288816 100644 --- a/src/msg/msg_actions.c +++ b/src/msg/msg_actions.c @@ -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 { diff --git a/src/simix/smx_deployment.c b/src/simix/smx_deployment.c index f5187d4209..511e69585a 100644 --- a/src/simix/smx_deployment.c +++ b/src/simix/smx_deployment.c @@ -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; }