fix warnings
authorMatthias Braun <matze@braunis.de>
Sun, 17 Jun 2007 13:09:24 +0000 (13:09 +0000)
committerMatthias Braun <matze@braunis.de>
Sun, 17 Jun 2007 13:09:24 +0000 (13:09 +0000)
[r14547]

16 files changed:
ir/ana/absgraph.c
ir/ana/cgana.c
ir/ana/compute_loop_info.c
ir/ana/dfs.c
ir/ana/execfreq.c
ir/ana/field_temperature.c
ir/ana/irconsconfirm.c
ir/ana/irdom.c
ir/ana/irextbb.c
ir/ana/irlivechk.c
ir/ana/irouts.c
ir/ana/irscc.c
ir/ana/irsimpletype.c
ir/ana/phiclass.c
ir/ana/rta.c
ir/ana/trouts.c

index 8bd3155..b880304 100644 (file)
@@ -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 = {
index 8950e59..4f3489b 100644 (file)
@@ -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);
   }
index b3930e7..bb79646 100644 (file)
@@ -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)
index 7151a56..880706e 100644 (file)
@@ -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;
 }
 
index 1e2526f..6edc7af 100644 (file)
@@ -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;
 }
index f36bff4..571c04c 100644 (file)
 
 /* 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;
 }
index eb5a354..756f68a 100644 (file)
@@ -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)
index 97a1079..af11ca9 100644 (file)
@@ -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... */
index 3ae9015..de41e7c 100644 (file)
@@ -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.
index 2c56d98..ff2036d 100644 (file)
@@ -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;
 }
 
index d606470..fb5f029 100644 (file)
@@ -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);
index 0a68337..46c6582 100644 (file)
@@ -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);
 }
index 28ab825..c84e696 100644 (file)
@@ -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);
index 4b5397d..f90046f 100644 (file)
@@ -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;
 }
index 9fad784..ebac2a2 100644 (file)
@@ -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;
 
index 11d2c56..6af8dd7 100644 (file)
@@ -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;