From 3571b99127e71fef4e0e017b2b60ea5be6210468 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 18 Jun 2007 14:03:58 +0000 Subject: [PATCH] fixed warnings [r14594] --- ir/ana/callgraph.c | 2 ++ ir/ana/cdep.c | 1 + ir/ana/execution_frequency.c | 20 ++++++++++++++------ ir/ana/height.c | 1 + ir/ana/interval_analysis.c | 6 +++++- ir/ana/ircfscc.c | 4 +++- ir/ana/irmemory.c | 3 ++- 7 files changed, 28 insertions(+), 9 deletions(-) diff --git a/ir/ana/callgraph.c b/ir/ana/callgraph.c index 696486805..9ae1dee37 100644 --- a/ir/ana/callgraph.c +++ b/ir/ana/callgraph.c @@ -229,6 +229,7 @@ double get_irg_caller_method_execution_frequency(ir_graph *irg, int pos) { static void ana_Call(ir_node *n, void *env) { int i, n_callees; ir_graph *irg; + (void) env; if (! is_Call(n)) return; @@ -1202,6 +1203,7 @@ static void compute_method_execution_frequency(ir_graph *irg, void *env) { double freq; int found_edge; int n_callees; + (void) env; if (cg_irg_visited(irg)) return; diff --git a/ir/ana/cdep.c b/ir/ana/cdep.c index 641a58b6d..d746f19da 100644 --- a/ir/ana/cdep.c +++ b/ir/ana/cdep.c @@ -180,6 +180,7 @@ void compute_cdep(ir_graph *irg) void free_cdep(ir_graph *irg) { + (void) irg; // TODO atm leaking more memory than a small memory leaking animal } diff --git a/ir/ana/execution_frequency.c b/ir/ana/execution_frequency.c index 807c19098..907f9f384 100644 --- a/ir/ana/execution_frequency.c +++ b/ir/ana/execution_frequency.c @@ -62,6 +62,8 @@ static set *exec_freq_set = NULL; static int exec_freq_cmp(const void *e1, const void *e2, size_t size) { reg_exec_freq *ef1 = (reg_exec_freq *)e1; reg_exec_freq *ef2 = (reg_exec_freq *)e2; + (void) size; + return (ef1->reg != ef2->reg); } @@ -187,8 +189,9 @@ static void my_irg_walk_current_graph(irg_walk_func *pre, irg_walk_func *post, v } -static void walk_pre(ir_node *n, void *env) { - +static void walk_pre(ir_node *n, void *env) +{ + (void) env; if (get_irn_op(n) == op_Raise) just_passed_a_Raise = 1; @@ -218,8 +221,9 @@ static void walk_pre(ir_node *n, void *env) { } } -static void walk_post(ir_node *n, void *env) { - +static void walk_post(ir_node *n, void *env) +{ + (void) env; if (get_irn_op(n) == op_Raise) just_passed_a_Raise = 0; @@ -292,7 +296,9 @@ int is_fragile_Proj(ir_node *n) { static double exception_prob = 0.001; -static INLINE int is_loop_head(ir_node *cond) { +static INLINE int is_loop_head(ir_node *cond) +{ + (void) cond; return 0; } @@ -347,8 +353,10 @@ static INLINE void compute_region_freqency(void *reg, double head_weight) { set_region_exec_freq(reg, my_freq); } -static void check_proper_head(ir_loop *l, void *reg) { +static void check_proper_head(ir_loop *l, void *reg) +{ int i, n_ins = get_region_n_ins(reg); + (void) l; for (i = 0; i < n_ins; ++i) { assert(!get_region_in(reg, i)); } diff --git a/ir/ana/height.c b/ir/ana/height.c index 6d3f708f4..df1bae376 100644 --- a/ir/ana/height.c +++ b/ir/ana/height.c @@ -54,6 +54,7 @@ typedef struct { static void *irn_height_init(ir_phase *ph, ir_node *irn, void *data) { + (void) irn; irn_height_t *h = data ? data : phase_alloc(ph, sizeof(h[0])); memset(h, 0, sizeof(h[0])); return h; diff --git a/ir/ana/interval_analysis.c b/ir/ana/interval_analysis.c index 896cd3698..507020082 100644 --- a/ir/ana/interval_analysis.c +++ b/ir/ana/interval_analysis.c @@ -63,6 +63,7 @@ static set *region_attr_set = NULL; int region_attr_cmp(const void *e1, const void *e2, size_t size) { region_attr *ra1 = (region_attr *)e1; region_attr *ra2 = (region_attr *)e2; + (void) size; return (ra1->reg != ra2->reg); } @@ -191,10 +192,13 @@ static int find_inner_loop(ir_node *b, ir_loop *l, ir_node *pred, ir_node *cfop) } -static int find_previous_loop(ir_loop *l, ir_loop *pred_l, ir_node *b, ir_node *pred_b, ir_node *cfop) { +static int find_previous_loop(ir_loop *l, ir_loop *pred_l, ir_node *b, + ir_node *pred_b, ir_node *cfop) +{ ir_loop *outer = get_loop_outer_loop(l); int found, i; int l_pos = get_loop_element_pos(outer, l); + (void) pred_l; assert(l_pos > -1); assert(l_pos > 0 && "Is this a necessary condition? There could be a perfect nest ..."); diff --git a/ir/ana/ircfscc.c b/ir/ana/ircfscc.c index 6adbc979c..889e3c5d4 100644 --- a/ir/ana/ircfscc.c +++ b/ir/ana/ircfscc.c @@ -304,7 +304,9 @@ static ir_loop *new_loop (void) { * Called from a walker. */ static INLINE void -init_node (ir_node *n, void *env) { +init_node (ir_node *n, void *env) +{ + (void) env; if (is_Block(n)) set_irn_link (n, new_scc_info()); clear_backedges(n); diff --git a/ir/ana/irmemory.c b/ir/ana/irmemory.c index 8a697fef3..21ab97886 100644 --- a/ir/ana/irmemory.c +++ b/ir/ana/irmemory.c @@ -681,6 +681,7 @@ typedef struct mem_disambig_entry { static int cmp_mem_disambig_entry(const void *elt, const void *key, size_t size) { const mem_disambig_entry *p1 = elt; const mem_disambig_entry *p2 = key; + (void) size; return p1->adr1 == p2->adr1 && p1->adr2 == p2->adr2; } /* cmp_mem_disambig_entry */ @@ -909,7 +910,7 @@ static void print_address_taken_state(ir_type *tp) { ir_address_taken_state state = get_entity_address_taken(ent); if (state != ir_address_not_taken) { - assert(ir_address_not_taken <= state && state <= ir_address_taken); + assert(ir_address_not_taken <= (int) state && state <= ir_address_taken); ir_printf("%+F: %s\n", ent, get_address_taken_state_name(state)); } } -- 2.20.1