From: Michael Beck Date: Tue, 1 Mar 2011 23:33:43 +0000 (+0100) Subject: Fixed size_t related warnings. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=19b31a8570f2a2901ca0d1010bf958ecb94170fd;p=libfirm Fixed size_t related warnings. --- diff --git a/ir/opt/tropt.c b/ir/opt/tropt.c index 71d790735..16b9ab4f7 100644 --- a/ir/opt/tropt.c +++ b/ir/opt/tropt.c @@ -144,7 +144,7 @@ static ir_node *normalize_values_type(ir_type *totype, ir_node *pred) while (get_class_supertype_index(fromtype, totype) == (size_t)-1) { /* Insert a cast to a supertype of fromtype. */ ir_type *new_type = NULL; - int i, n_supertypes = get_class_n_supertypes(fromtype); + size_t i, n_supertypes = get_class_n_supertypes(fromtype); for (i = 0; i < n_supertypes && !new_type; ++i) { ir_type *new_super = get_class_supertype(fromtype, i); if (is_SubClass_of(new_super, totype)) diff --git a/ir/tr/typewalk.c b/ir/tr/typewalk.c index d645b1229..b0725f3e5 100644 --- a/ir/tr/typewalk.c +++ b/ir/tr/typewalk.c @@ -344,7 +344,6 @@ static void type_walk_s2s_2(type_or_ent tore, void *env) { type_or_ent cont; - int i, n; /* marked? */ switch (get_kind(tore.ent)) { @@ -367,6 +366,8 @@ static void type_walk_s2s_2(type_or_ent tore, switch (get_type_tpop_code(tp)) { case tpo_class: { + size_t i, n; + n = get_class_n_supertypes(tp); for (i = 0; i < n; ++i) { cont.typ = get_class_supertype(tp, i); @@ -434,7 +435,6 @@ static void type_walk_super_2(type_or_ent tore, type_walk_func *pre, type_walk_func *post, void *env) { type_or_ent cont; - int i, n; /* marked? */ switch (get_kind(tore.ent)) { @@ -459,6 +459,8 @@ static void type_walk_super_2(type_or_ent tore, type_walk_func *pre, switch (get_type_tpop_code(tp)) { case tpo_class: { + size_t i, n; + /* execute pre method */ if (pre) pre(tore, env); @@ -519,7 +521,7 @@ void type_walk_super(type_walk_func *pre, type_walk_func *post, void *env) static void class_walk_s2s_2(ir_type *tp, class_walk_func *pre, class_walk_func *post, void *env) { - int i, n; + size_t i, n; /* marked? */ if (type_visited(tp)) return; @@ -575,7 +577,7 @@ void walk_types_entities(ir_type *tp, entity_walk_func *doit, void *env) { - int i, n; + size_t i, n; switch (get_type_tpop_code(tp)) { case tpo_class: