From 184f7cbedd7496fb81e192e78f7beae87f942ee5 Mon Sep 17 00:00:00 2001 From: Marion Guthmuller Date: Wed, 13 Jun 2012 14:56:03 +0200 Subject: [PATCH] model-checker : remove unused argument in functions for heap comparison algorithm --- include/xbt/mmalloc.h | 2 +- src/mc/mc_liveness.c | 8 ++++---- src/mc/mc_private.h | 2 +- src/xbt/mmalloc/mm_diff.c | 6 +++--- src/xbt/mmalloc/mmprivate.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/xbt/mmalloc.h b/include/xbt/mmalloc.h index b53046853f..71efba7171 100644 --- a/include/xbt/mmalloc.h +++ b/include/xbt/mmalloc.h @@ -58,7 +58,7 @@ extern void mmalloc_display_info_heap(xbt_mheap_t h); void mmalloc_set_current_heap(xbt_mheap_t new_heap); xbt_mheap_t mmalloc_get_current_heap(void); -int mmalloc_compare_heap(xbt_mheap_t mdp1, xbt_mheap_t mdp2, void* s_heap, void* r_heap); +int mmalloc_compare_heap(xbt_mheap_t mdp1, xbt_mheap_t mdp2, void* s_heap); void mmalloc_backtrace_display(xbt_mheap_t mdp, void *addr); diff --git a/src/mc/mc_liveness.c b/src/mc/mc_liveness.c index 38dc7bd64c..e2659351c2 100644 --- a/src/mc/mc_liveness.c +++ b/src/mc/mc_liveness.c @@ -65,7 +65,7 @@ int data_libsimgrid_region_compare(void *d1, void *d2, size_t size){ return distance; } -int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2, void* s_heap, void* r_heap){ +int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2, void* s_heap){ if(s1->num_reg != s2->num_reg){ @@ -93,7 +93,7 @@ int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2, void* s_heap, void* r_h XBT_INFO("Different start addr of heap (s1 = %p, s2 = %p)", s1->regions[i]->start_addr, s2->regions[i]->start_addr); errors++; } - if(mmalloc_compare_heap(s1->regions[i]->data, s2->regions[i]->data, s_heap, r_heap)){ + if(mmalloc_compare_heap(s1->regions[i]->data, s2->regions[i]->data, s_heap)){ XBT_INFO("Different heap (mmalloc_compare)"); errors++; } @@ -174,7 +174,7 @@ int reached(xbt_state_t st){ //XBT_INFO("Rdv points size %d - %d", xbt_dict_length(pair_test->rdv_points), xbt_dict_length(current_rdv_points)); //if(xbt_dict_length(pair_test->rdv_points) == xbt_dict_length(current_rdv_points)){ //if(rdv_points_compare(pair_test->rdv_points, current_rdv_points) == 0){ - if(snapshot_compare(pair_test->system_state, sn, std_heap, raw_heap) == 0){ + if(snapshot_compare(pair_test->system_state, sn, std_heap) == 0){ MC_free_snapshot(sn); xbt_dynar_reset(prop_ato); @@ -573,7 +573,7 @@ int visited(xbt_state_t st, int sc){ if(pair_test->search_cycle == sc) { if(automaton_state_compare(pair_test->automaton_state, st) == 0){ if(propositional_symbols_compare_value(pair_test->prop_ato, prop_ato) == 0){ - if(snapshot_compare(pair_test->system_state, sn, std_heap, raw_heap) == 0){ + if(snapshot_compare(pair_test->system_state, sn, std_heap) == 0){ MC_free_snapshot(sn); xbt_dynar_reset(prop_ato); diff --git a/src/mc/mc_private.h b/src/mc/mc_private.h index 90a0e39233..449356123a 100644 --- a/src/mc/mc_private.h +++ b/src/mc/mc_private.h @@ -253,7 +253,7 @@ int reached(xbt_state_t st); void set_pair_reached(xbt_state_t st); int reached_hash(xbt_state_t st); void set_pair_reached_hash(xbt_state_t st); -int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2, void* s_heap, void* r_heap); +int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2, void* s_heap); int data_program_region_compare(void *d1, void *d2, size_t size); int data_libsimgrid_region_compare(void *d1, void *d2, size_t size); void MC_pair_delete(mc_pair_t pair); diff --git a/src/xbt/mmalloc/mm_diff.c b/src/xbt/mmalloc/mm_diff.c index 9b6de46984..498622fc5d 100644 --- a/src/xbt/mmalloc/mm_diff.c +++ b/src/xbt/mmalloc/mm_diff.c @@ -112,20 +112,20 @@ void mmalloc_backtrace_fragment_display(xbt_mheap_t mdp, size_t block, size_t fr } } -int mmalloc_compare_heap(xbt_mheap_t mdp1, xbt_mheap_t mdp2, void* s_heap, void* r_heap){ +int mmalloc_compare_heap(xbt_mheap_t mdp1, xbt_mheap_t mdp2, void* s_heap){ if(mdp1 == NULL && mdp2 == NULL){ fprintf(stderr, "Malloc descriptors null\n"); return 0; } - int errors = mmalloc_compare_mdesc(mdp1, mdp2, s_heap, r_heap); + int errors = mmalloc_compare_mdesc(mdp1, mdp2, s_heap); return (errors > 0); } -int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2, void* s_heap, void* r_heap){ +int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2, void* s_heap){ int errors = 0; diff --git a/src/xbt/mmalloc/mmprivate.h b/src/xbt/mmalloc/mmprivate.h index 45d1a78883..b3fcff668b 100644 --- a/src/xbt/mmalloc/mmprivate.h +++ b/src/xbt/mmalloc/mmprivate.h @@ -224,7 +224,7 @@ struct mdesc { }; -int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2, void* s_heap, void* r_heap); +int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2, void* s_heap); void mmalloc_display_info(void *h); -- 2.20.1