Commit 9c359401 authored by Michael Beck's avatar Michael Beck
Browse files

Fixed some size_t related warnings.

[r28266]
parent 9e62b7a1
/*
* Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
* Copyright (C) 1995-2011 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
......@@ -264,7 +264,7 @@ static void skip_barrier(ir_node *block, ir_graph *irg)
sched_foreach_reverse(block, irn) {
int arity;
unsigned *used;
unsigned n_used;
size_t n_used;
const ir_edge_t *edge, *next;
if (!be_is_Barrier(irn))
......@@ -295,7 +295,7 @@ static void skip_barrier(ir_node *block, ir_graph *irg)
/* the barrier also had the effect of a Keep for unused inputs.
* we now have to create an explicit Keep for them */
n_used = rbitset_popcount(used, arity);
if (n_used < (unsigned) arity) {
if (n_used < (size_t) arity) {
int n_in = arity - (int) n_used;
ir_node **in = ALLOCAN(ir_node*, n_in);
int i = 0;
......
/*
* Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
* Copyright (C) 1995-2011 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
......@@ -597,7 +597,7 @@ static ir_node *muchnik_select(void *block_env, ir_nodeset_t *ready_set, ir_node
DB((env->dbg, LEVEL_3, "\tirn = %+F, mcand = 1, max_delay = %u\n", irn, max_delay));
}
else {
int cnt = ir_nodeset_size(&ecands);
size_t cnt = ir_nodeset_size(&ecands);
if (cnt == 1) {
irn = get_nodeset_node(&ecands);
......@@ -608,7 +608,7 @@ static ir_node *muchnik_select(void *block_env, ir_nodeset_t *ready_set, ir_node
DB((env->dbg, LEVEL_3, "\tirn = %+F, ecand = 1, max_delay = %u\n", irn, max_delay));
}
else if (cnt > 1) {
DB((env->dbg, LEVEL_3, "\tecand = %d, max_delay = %u\n", cnt, max_delay));
DB((env->dbg, LEVEL_3, "\tecand = %zu, max_delay = %u\n", cnt, max_delay));
irn = basic_selection(&ecands);
}
else {
......
/*
* Copyright (C) 1995-2010 University of Karlsruhe. All right reserved.
* Copyright (C) 1995-2011 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
......@@ -6689,7 +6689,7 @@ ir_node *optimize_node(ir_node *n)
tv = computed_value(n);
if (tv != tarval_bad) {
ir_node *nw;
int node_size;
size_t node_size;
/*
* we MUST copy the node here temporary, because it's still
......
......@@ -33,7 +33,7 @@ int lc_appendable_snwadd(lc_appendable_t *app, const char *str, size_t len,
{
int res = 0;
int i;
int to_pad = width - len;
size_t to_pad = width > len ? width - len : 0;
/* If not left justified, pad left */
for (i = 0; !left_just && i < to_pad; ++i)
......
......@@ -725,8 +725,8 @@ int lc_opt_from_single_arg(const lc_opt_entry_t *root,
const char *arg, lc_opt_error_handler_t *handler)
{
const lc_opt_entry_t *grp = root;
int n = strlen(arg);
int n_prefix = opt_prefix ? strlen(opt_prefix) : 0;
size_t n = strlen(arg);
size_t n_prefix = opt_prefix ? strlen(opt_prefix) : 0;
int error = 0;
int ret = 0;
......
/*
* Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
* Copyright (C) 1995-2011 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
......@@ -66,7 +66,7 @@ typedef union {
*/
typedef struct path_t {
unsigned vnum; /**< The value number. */
unsigned path_len; /**< The length of the access path. */
size_t path_len; /**< The length of the access path. */
path_elem_t path[1]; /**< The path. */
} path_t;
......@@ -436,9 +436,10 @@ static int find_possible_replacements(ir_graph *irg)
* @param sel the Sel node
* @param len the length of the path so far
*/
static path_t *find_path(ir_node *sel, unsigned len)
static path_t *find_path(ir_node *sel, size_t len)
{
int pos, i, n;
size_t pos;
int i, n;
path_t *res;
ir_node *pred = get_Sel_ptr(sel);
......
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