Commit e3f51845 authored by Matthias Braun's avatar Matthias Braun
Browse files

fix more size_t warnings

parent 1e77e520
......@@ -51,7 +51,7 @@
/** Number of Load/Store nodes that possibly access this entity. */
FIRM_API size_t get_entity_n_accesses(const ir_entity *ent);
/** Load/Store node that possibly access this entity. */
FIRM_API ir_node *get_entity_access(const ir_entity *ent, int pos);
FIRM_API ir_node *get_entity_access(const ir_entity *ent, size_t pos);
/** Number of references to an entity, in form of SymConst/Sel.
* Including references from constant entities and the like. */
......
......@@ -121,7 +121,6 @@ static size_t reverse_pos(const ir_graph *callee, size_t pos_caller)
{
ir_graph *caller = get_irg_caller(callee, pos_caller);
/* search the other relation for the corresponding edge. */
int pos_callee = -1;
size_t i, n_callees = get_irg_n_callees(caller);
for (i = 0; i < n_callees; ++i) {
if (get_irg_callee(caller, i) == callee) {
......@@ -251,7 +250,7 @@ static void ana_Call(ir_node *n, void *env)
if (callee) {
cg_callee_entry buf;
cg_callee_entry *found;
int depth;
unsigned depth;
buf.irg = callee;
......
......@@ -223,11 +223,11 @@ size_t get_entity_n_accesses(const ir_entity *ent)
return ARR_LEN(accs);
}
ir_node *get_entity_access(const ir_entity *ent, int pos)
ir_node *get_entity_access(const ir_entity *ent, size_t pos)
{
ir_node ** accs;
assert(0 <= pos && pos < get_entity_n_accesses(ent));
assert(pos < get_entity_n_accesses(ent));
accs = get_entity_access_array(ent);
return accs[pos];
......
......@@ -1910,7 +1910,7 @@ static void dump_type_info(type_or_ent tore, void *env)
}
break;
case tpo_union:
for (i = get_union_n_members(tp); i >= 0;) {
for (i = get_union_n_members(tp); i > 0;) {
--i;
print_type_ent_edge(F, tp, get_union_member(tp, i), UNION_EDGE_ATTR);
}
......
......@@ -193,6 +193,7 @@ void dump_irnode_to_file(FILE *F, ir_node *n)
ir_fprintf(F, " result %d type: %+F\n", i, get_method_res_type(tp, i));
}
if (Call_has_callees(n)) {
size_t i;
fprintf(F, " possible callees:\n");
for (i = 0; i < get_Call_n_callees(n); i++) {
fprintf(F, " %d: %s\n", i, get_ent_dump_name(get_Call_callee(n, i)));
......
......@@ -1668,7 +1668,8 @@ static void lower_Call(ir_node *node, ir_mode *mode, lower_env_t *env)
ir_node **in, *proj, *results;
size_t n_params, n_res;
bool need_lower = false;
int i, j;
size_t i, j;
size_t p;
long *res_numbers = NULL;
(void) mode;
......@@ -1681,8 +1682,8 @@ static void lower_Call(ir_node *node, ir_mode *mode, lower_env_t *env)
assert(! is_lowered_type(call_tp));
n_params = get_method_n_params(call_tp);
for (i = 0; i < n_params; ++i) {
ir_type *tp = get_method_param_type(call_tp, i);
for (p = 0; p < n_params; ++p) {
ir_type *tp = get_method_param_type(call_tp, p);
if (is_Primitive_type(tp)) {
ir_mode *mode = get_type_mode(tp);
......
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