From 1b57293234c2f0c753f48c94e0ca0f127b15a27b Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sun, 17 Jun 2007 13:09:24 +0000 Subject: [PATCH] fix warnings [r14547] --- ir/ana/absgraph.c | 10 ++++++++-- ir/ana/cgana.c | 3 +++ ir/ana/compute_loop_info.c | 1 + ir/ana/dfs.c | 3 +++ ir/ana/execfreq.c | 2 ++ ir/ana/field_temperature.c | 3 +++ ir/ana/irconsconfirm.c | 1 + ir/ana/irdom.c | 10 ++++++---- ir/ana/irextbb.c | 2 +- ir/ana/irlivechk.c | 1 + ir/ana/irouts.c | 5 ++++- ir/ana/irscc.c | 2 ++ ir/ana/irsimpletype.c | 1 + ir/ana/phiclass.c | 1 + ir/ana/rta.c | 1 + ir/ana/trouts.c | 4 +++- 16 files changed, 41 insertions(+), 9 deletions(-) diff --git a/ir/ana/absgraph.c b/ir/ana/absgraph.c index 8bd315592..b880304c2 100644 --- a/ir/ana/absgraph.c +++ b/ir/ana/absgraph.c @@ -41,8 +41,11 @@ static void irg_cfg_succ_grow_succs(void *self, void *node, struct obstack *obst { ir_node *bl = node; const ir_edge_t *edge; - foreach_block_succ(bl, edge) + + (void) self; + foreach_block_succ(bl, edge) { obstack_ptr_grow(obst, get_edge_src_irn(edge)); + } } const absgraph_t absgraph_irg_cfg_succ = { @@ -58,8 +61,11 @@ static void *irg_cfg_pred_get_root(void *self) static void irg_cfg_pred_grow_succs(void *self, void *node, struct obstack *obst) { int i, n; - for (i = 0, n = get_irn_arity(node); i < n; ++i) + + (void) self; + for (i = 0, n = get_irn_arity(node); i < n; ++i) { obstack_ptr_grow(obst, get_irn_n(node, i)); + } } const absgraph_t absgraph_irg_cfg_pred = { diff --git a/ir/ana/cgana.c b/ir/ana/cgana.c index 8950e59ea..4f3489b80 100644 --- a/ir/ana/cgana.c +++ b/ir/ana/cgana.c @@ -740,6 +740,7 @@ static void callee_ana_node(ir_node *node, eset *methods) { * callees for that call. */ static void callee_walker(ir_node * call, void * env) { + (void) env; if (is_Call(call)) { eset * methods = eset_create(); ir_entity * ent; @@ -786,6 +787,7 @@ static void callee_walker(ir_node * call, void * env) { * Walker: Removes all tuple. */ static void remove_Tuples(ir_node *proj, void *env) { + (void) env; ir_node *nn; if (! is_Proj(proj)) return; @@ -833,6 +835,7 @@ static void sel_methods_dispose(void) { /*--------------------------------------------------------------------------*/ static void destruct_walker(ir_node * node, void * env) { + (void) env; if (is_Call(node)) { remove_Call_callee_arr(node); } diff --git a/ir/ana/compute_loop_info.c b/ir/ana/compute_loop_info.c index b3930e749..bb79646f6 100644 --- a/ir/ana/compute_loop_info.c +++ b/ir/ana/compute_loop_info.c @@ -344,6 +344,7 @@ static void set_loop_info(ir_node *n, void *env) tarval *loop_end; induct_var_info info; int is_endlessloop = 0 , is_nonentered_loop = 0; + (void) env; /* The IR node must be a induction variable. */ if (get_irn_op(n) != op_Phi) diff --git a/ir/ana/dfs.c b/ir/ana/dfs.c index 7151a56f0..880706e67 100644 --- a/ir/ana/dfs.c +++ b/ir/ana/dfs.c @@ -36,6 +36,7 @@ static int cmp_edge(const void *a, const void *b, size_t sz) { const dfs_edge_t *p = a; const dfs_edge_t *q = b; + (void) sz; return !(p->src == q->src && p->tgt == q->tgt); } @@ -44,6 +45,8 @@ static int cmp_node(const void *a, const void *b, size_t sz) { const dfs_node_t *p = a; const dfs_node_t *q = b; + (void) sz; + return p->node != q->node; } diff --git a/ir/ana/execfreq.c b/ir/ana/execfreq.c index 1e2526f74..6edc7afcd 100644 --- a/ir/ana/execfreq.c +++ b/ir/ana/execfreq.c @@ -87,6 +87,7 @@ cmp_freq(const void *a, const void *b, size_t size) { const freq_t *p = a; const freq_t *q = b; + (void) size; return !(p->irn == q->irn); } @@ -225,6 +226,7 @@ ir_exec_freq *create_execfreq(ir_graph *irg) execfreq->hook.context = execfreq; execfreq->hook.hook._hook_node_info = exec_freq_node_info; register_hook(hook_node_info, &execfreq->hook); + (void) irg; return execfreq; } diff --git a/ir/ana/field_temperature.c b/ir/ana/field_temperature.c index f36bff4b5..571c04c13 100644 --- a/ir/ana/field_temperature.c +++ b/ir/ana/field_temperature.c @@ -54,10 +54,12 @@ /* The entities that can be accessed by this Sel node. */ int get_Sel_n_accessed_entities(ir_node *sel) { + (void) sel; return 1; } ir_entity *get_Sel_accessed_entity(ir_node *sel, int pos) { + (void) pos; return get_Sel_entity(sel); } @@ -136,6 +138,7 @@ double get_type_estimated_n_instances(ir_type *tp) { } double get_type_estimated_mem_consumption_bytes(ir_type *tp) { + (void) tp; assert(0); return 0.0; } diff --git a/ir/ana/irconsconfirm.c b/ir/ana/irconsconfirm.c index eb5a3542c..756f68a60 100644 --- a/ir/ana/irconsconfirm.c +++ b/ir/ana/irconsconfirm.c @@ -312,6 +312,7 @@ void construct_confirms(ir_graph *irg) * Post-walker: Remove Confirm nodes */ static void rem_Confirm(ir_node *n, void *env) { + (void) env; if (get_irn_op(n) == op_Confirm) { ir_node *value = get_Confirm_value(n); if (value != n) diff --git a/ir/ana/irdom.c b/ir/ana/irdom.c index 97a10795d..af11ca9d1 100644 --- a/ir/ana/irdom.c +++ b/ir/ana/irdom.c @@ -398,6 +398,7 @@ static void assign_tree_dom_pre_order_max(ir_node *bl, void *data) ir_node *p; unsigned max = 0; unsigned children = 0; + (void) data; for(p = bi->first; p; p = get_dom_info(p)->next) { unsigned max_p = get_dom_info(p)->max_subtree_pre_num; @@ -423,6 +424,7 @@ static void assign_tree_postdom_pre_order_max(ir_node *bl, void *data) ir_node *p; unsigned max = 0; unsigned children = 0; + (void) data; for(p = bi->first; p; p = get_pdom_info(p)->next) { unsigned max_p = get_pdom_info(p)->max_subtree_pre_num; @@ -789,8 +791,8 @@ void assure_doms(ir_graph *irg) { void free_dom(ir_graph *irg) { /* Update graph state */ - assert(get_irg_phase_state(current_ir_graph) != phase_building); - current_ir_graph->dom_state = dom_none; + assert(get_irg_phase_state(irg) != phase_building); + irg->dom_state = dom_none; /* With the implementation right now there is nothing to free, but better call it anyways... */ @@ -900,8 +902,8 @@ void assure_postdoms(ir_graph *irg) { void free_postdom(ir_graph *irg) { /* Update graph state */ - assert(get_irg_phase_state(current_ir_graph) != phase_building); - current_ir_graph->pdom_state = dom_none; + assert(get_irg_phase_state(irg) != phase_building); + irg->pdom_state = dom_none; /* With the implementation right now there is nothing to free, but better call it anyways... */ diff --git a/ir/ana/irextbb.c b/ir/ana/irextbb.c index 3ae9015d3..de41e7cb7 100644 --- a/ir/ana/irextbb.c +++ b/ir/ana/irextbb.c @@ -137,7 +137,7 @@ static void pre_walk_calc_extbb(ir_node *block, void *ctx) } /** A special extended block used as sentinel */ -static ir_extblk _sentinel = { k_ir_extblk, 0xFEA1DEAD }; +static ir_extblk _sentinel = { k_ir_extblk, 0xFEA1DEAD, NULL, NULL }; /** * Post block-walker. Calculates the extended block info. diff --git a/ir/ana/irlivechk.c b/ir/ana/irlivechk.c index 2c56d9816..ff2036d13 100644 --- a/ir/ana/irlivechk.c +++ b/ir/ana/irlivechk.c @@ -102,6 +102,7 @@ static void *init_block_data(ir_phase *ph, ir_node *irn, void *old) bi->red_reachable = bitset_obstack_alloc(phase_obst(ph), lv->n_blocks); bi->be_tgt_reach = bitset_obstack_alloc(phase_obst(ph), lv->n_blocks); bi->be_tgt_dom = bitset_obstack_alloc(phase_obst(ph), lv->n_blocks); + (void) old; return bi; } diff --git a/ir/ana/irouts.c b/ir/ana/irouts.c index d60647077..fb5f029df 100644 --- a/ir/ana/irouts.c +++ b/ir/ana/irouts.c @@ -53,6 +53,7 @@ #ifdef DEBUG_libfirm /** Clear the outs of a node */ static void reset_outs(ir_node *node, void *unused) { + (void) unused; node->out = NULL; node->out_valid = 0; } @@ -482,6 +483,7 @@ void free_irp_outs(void) { * before counting. */ static void init_count(ir_node * node, void *env) { + (void) env; node->out = (ir_node **) 1; /* 1 for the array size */ } @@ -548,10 +550,11 @@ static void set_array_pointer(ir_node *node, void *env) { * Adds an outedge from the predecessor to the * current node. */ -static void set_out_pointer(ir_node * node, void * env) { +static void set_out_pointer(ir_node * node, void *env) { int i, arity = get_irn_arity(node); ir_node *succ; int start = (!is_Block(node)) ? -1 : 0; + (void) env; for (i = start; i < arity; ++i) { succ = get_irn_n(node, i); diff --git a/ir/ana/irscc.c b/ir/ana/irscc.c index 0a6833727..46c6582e6 100644 --- a/ir/ana/irscc.c +++ b/ir/ana/irscc.c @@ -523,6 +523,7 @@ ir_loop *(get_irg_loop)(ir_graph *irg) { static INLINE void init_node (ir_node *n, void *env) { + (void) env; set_irn_link (n, new_scc_info()); clear_backedges(n); } @@ -1302,6 +1303,7 @@ static void loop_reset_backedges(ir_loop *l) { */ static void loop_reset_node(ir_node *n, void *env) { + (void) env; set_irn_loop(n, NULL); reset_backedges(n); } diff --git a/ir/ana/irsimpletype.c b/ir/ana/irsimpletype.c index 28ab8259c..c84e696a8 100644 --- a/ir/ana/irsimpletype.c +++ b/ir/ana/irsimpletype.c @@ -425,6 +425,7 @@ static ir_type *compute_irn_type(ir_node *n) { static void compute_type(ir_node *n, void *env) { ir_type *tp = get_irn_typeinfo_type(n); + (void) env; if (tp == phi_cycle_type) { /* printf(" recomputing for phi_cycle_type "); DDMN(n); */ set_irn_typeinfo_type(n, initial_type); diff --git a/ir/ana/phiclass.c b/ir/ana/phiclass.c index 4b5397d47..f90046f1c 100644 --- a/ir/ana/phiclass.c +++ b/ir/ana/phiclass.c @@ -66,6 +66,7 @@ static INLINE void _set_phi_class(ir_phase *ph, ir_node *irn, ir_node ***cls) { /* initialize data structure for given irn in given phase */ static void *irn_phi_class_init(ir_phase *ph, ir_node *irn, void *data) { irn_phi_class_t *ipc = data ? data : phase_alloc(ph, sizeof(ipc[0])); + (void) irn; memset(ipc, 0, sizeof(ipc[0])); return ipc; } diff --git a/ir/ana/rta.c b/ir/ana/rta.c index 9fad78404..ebac2a221 100644 --- a/ir/ana/rta.c +++ b/ir/ana/rta.c @@ -448,6 +448,7 @@ void rta_init (int do_verbose) * dead graphs to peculiarity_description. */ static void make_entity_to_description(type_or_ent *tore, void *env) { + (void) env; if (get_kind(tore) == k_entity) { ir_entity *ent = (ir_entity *)tore; diff --git a/ir/ana/trouts.c b/ir/ana/trouts.c index 11d2c5644..6af8dd770 100644 --- a/ir/ana/trouts.c +++ b/ir/ana/trouts.c @@ -479,7 +479,8 @@ static void init_trouts(void) { /** The number of entities that can be accessed by this Sel node. */ static int get_Sel_n_accessed_entities(ir_node *sel) { - return 1; + (void) sel; + return 1; } /** The entity that cat be accessed by this Sel node. */ @@ -540,6 +541,7 @@ static void chain_accesses(ir_node *n, void *env) { int i, n_ents; ir_node *addr; + (void) env; if (get_irn_op(n) == op_Alloc) { add_type_alloc(get_Alloc_type(n), n); return; -- 2.20.1