From a5a2a8374d711da836b246ec3cdfb6349be6d3d2 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 25 Feb 2012 17:59:50 +0100 Subject: [PATCH] use named type of functions --- src/mc/mc_liveness.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/mc/mc_liveness.c b/src/mc/mc_liveness.c index 3f0b223b6c..c7b280f70e 100644 --- a/src/mc/mc_liveness.c +++ b/src/mc/mc_liveness.c @@ -135,13 +135,13 @@ int reached(xbt_state_t st){ xbt_dynar_t prop_ato = xbt_dynar_new(sizeof(int), NULL); int res; - int (*f)(); + int_f_void_t f; /* Get values of propositional symbols */ unsigned int cursor = 0; xbt_propositional_symbol_t ps = NULL; xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){ - f = (int (*)())ps->function; + f = (int_f_void_t)ps->function; res = (*f)(); xbt_dynar_push_as(prop_ato, int, res); } @@ -364,10 +364,10 @@ void set_pair_reached(xbt_state_t st){ unsigned int cursor = 0; xbt_propositional_symbol_t ps = NULL; int res; - int (*f)(); + int_f_void_t f; xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){ - f = (int (*)())ps->function; + f = (int_f_void_t)ps->function; res = (*f)(); xbt_dynar_push_as(pair->prop_ato, int, res); } @@ -429,10 +429,10 @@ int reached_hash(xbt_state_t st){ unsigned int cursor = 0; xbt_propositional_symbol_t ps = NULL; int res; - int (*f)(); + int_f_void_t f; xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){ - f = (int (*)())ps->function; + f = (int_f_void_t)ps->function; res = (*f)(); xbt_dynar_push_as(prop_ato, int, res); } @@ -503,10 +503,10 @@ void set_pair_reached_hash(xbt_state_t st){ unsigned int cursor = 0; xbt_propositional_symbol_t ps = NULL; int res; - int (*f)(); + int_f_void_t f; xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){ - f = (int (*)())ps->function; + f = (int_f_void_t)ps->function; res = (*f)(); xbt_dynar_push_as(pair->prop_ato, int, res); } @@ -540,10 +540,10 @@ int visited(xbt_state_t st, int sc){ unsigned int cursor = 0; xbt_propositional_symbol_t ps = NULL; int res; - int (*f)(); + int_f_void_t f; xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){ - f = (int (*)())ps->function; + f = (int_f_void_t)ps->function; res = (*f)(); xbt_dynar_push_as(prop_ato, int, res); } @@ -615,10 +615,10 @@ int visited_hash(xbt_state_t st, int sc){ unsigned int cursor = 0; xbt_propositional_symbol_t ps = NULL; int res; - int (*f)(); + int_f_void_t f; xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){ - f = (int (*)())ps->function; + f = (int_f_void_t)ps->function; res = (*f)(); xbt_dynar_push_as(prop_ato, int, res); } @@ -693,10 +693,10 @@ void set_pair_visited_hash(xbt_state_t st, int sc){ unsigned int cursor = 0; xbt_propositional_symbol_t ps = NULL; int res; - int (*f)(); + int_f_void_t f; xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){ - f = (int (*)())ps->function; + f = (int_f_void_t)ps->function; res = (*f)(); xbt_dynar_push_as(pair->prop_ato, int, res); } @@ -727,10 +727,10 @@ void set_pair_visited(xbt_state_t st, int sc){ unsigned int cursor = 0; xbt_propositional_symbol_t ps = NULL; int res; - int (*f)(); + int_f_void_t f; xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){ - f = (int (*)())ps->function; + f = (int_f_void_t)ps->function; res = (*f)(); xbt_dynar_push_as(pair->prop_ato, int, res); } @@ -770,10 +770,10 @@ int MC_automaton_evaluate_label(xbt_exp_label_t l){ case 3 : { unsigned int cursor = 0; xbt_propositional_symbol_t p = NULL; - int (*f)(); + int_f_void_t f; xbt_dynar_foreach(automaton->propositional_symbols, cursor, p){ if(strcmp(p->pred, l->u.predicat) == 0){ - f = (int (*)())p->function; + f = (int_f_void_t)p->function; return (*f)(); } } -- 2.20.1