From: Christoph Mallon Date: Wed, 19 Jan 2011 13:02:23 +0000 (+0000) Subject: Correct signed/unsigned mismatches due to size_t. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=ff3e639deb91295b600dc3bc84d009ed26c7e09e;p=libfirm Correct signed/unsigned mismatches due to size_t. [r28258] --- diff --git a/ir/adt/set.c b/ir/adt/set.c index eb5576322..3b15140e4 100644 --- a/ir/adt/set.c +++ b/ir/adt/set.c @@ -180,8 +180,8 @@ void MANGLEP(describe) (SET *table) SET *(PMANGLE(new)) (MANGLEP(cmp_fun) cmp, size_t nslots) { - int i; - SET *table = XMALLOC(SET); + SET *table = XMALLOC(SET); + size_t i; if (nslots > SEGMENT_SIZE * DIRECTORY_SIZE) nslots = DIRECTORY_SIZE; diff --git a/ir/opt/opt_ldst.c b/ir/opt/opt_ldst.c index 6c75e3223..8d312d35c 100644 --- a/ir/opt/opt_ldst.c +++ b/ir/opt/opt_ldst.c @@ -1941,7 +1941,6 @@ static int insert_Load(block_t *bl) ir_node *block = bl->block; int i, n = get_Block_n_cfgpreds(block); size_t end = env.rbs_size - 1; - size_t pos; DB((dbg, LEVEL_3, "processing %+F\n", block)); @@ -1952,7 +1951,7 @@ static int insert_Load(block_t *bl) if (n > 1) { ir_node **ins; - int pos; + size_t pos; NEW_ARR_A(ir_node *, ins, n); @@ -2045,6 +2044,8 @@ static int insert_Load(block_t *bl) } if (n > 1) { + size_t pos; + /* check for partly redundant values */ for (pos = rbitset_next(bl->anticL_in, 0, 1); pos < end; diff --git a/ir/opt/parallelize_mem.c b/ir/opt/parallelize_mem.c index 57bd0f685..559f4f344 100644 --- a/ir/opt/parallelize_mem.c +++ b/ir/opt/parallelize_mem.c @@ -196,7 +196,7 @@ static void walker(ir_node *proj, void *env) ir_node *sync; ir_node **in; ir_nodeset_iterator_t iter; - int i; + size_t i; ++n; NEW_ARR_A(ir_node*, in, n); diff --git a/ir/stat/stat_dmp.c b/ir/stat/stat_dmp.c index b343fe42f..ff06543c2 100644 --- a/ir/stat/stat_dmp.c +++ b/ir/stat/stat_dmp.c @@ -471,7 +471,7 @@ static void simple_dump_edges(dumper_t *dmp, counter_t *cnt) */ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry) { - int i, dump_opts = 1; + int dump_opts = 1; block_entry_t *b_entry; extbb_entry_t *eb_entry; @@ -480,6 +480,7 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry) if (entry->irg) { ir_graph *const_irg = get_const_code_irg(); + int i; if (entry->irg == const_irg) fprintf(dmp->f, "\nConst code Irg %p", (void *)entry->irg); @@ -553,7 +554,7 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry) /* effects of optimizations */ if (dump_opts) { - int i; + size_t i; simple_dump_real_func_calls(dmp, &entry->cnt[gcnt_acc_real_func_call]); simple_dump_tail_recursion(dmp, entry->num_tail_recursion);