Commit 1b572932 authored by Matthias Braun's avatar Matthias Braun
Browse files

fix warnings

[r14547]
parent 3c169513
......@@ -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 = {
......
......@@ -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);
}
......
......@@ -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)
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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)
......
......@@ -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... */
......
......@@ -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.
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment