Commit 7ef5abc2 authored by Michael Beck's avatar Michael Beck
Browse files

Fixed size_t related warnings.

parent 812b94f9
......@@ -274,7 +274,7 @@ static inline void pop_scc_to_loop(ir_node *n)
can't they have two loops as sons? Does it never get that far? ) */
static void close_loop(ir_loop *l)
{
int last = get_loop_n_elements(l) - 1;
size_t last = get_loop_n_elements(l) - 1;
loop_element lelement = get_loop_element(l, last);
ir_loop *last_son = lelement.son;
......@@ -836,7 +836,7 @@ void free_all_loop_information(void)
static int is_loop_variant(ir_loop *l, ir_loop *b)
{
int i, n_elems;
size_t i, n_elems;
if (l == b) return 1;
......
......@@ -488,7 +488,6 @@ static void walk_entity(ir_entity *ent, void *env)
/* Walks over all code in const_code_irg. */
void walk_const_code(irg_walk_func *pre, irg_walk_func *post, void *env)
{
int j;
walk_env my_env;
ir_segment_t s;
size_t i;
......@@ -515,7 +514,7 @@ void walk_const_code(irg_walk_func *pre, irg_walk_func *post, void *env)
for (i = 0; i < n_types; i++) {
ir_type *tp = get_irp_type(i);
if (is_Array_type(tp)) {
int n_dim = get_array_n_dimensions(tp);
size_t j, n_dim = get_array_n_dimensions(tp);
for (j = 0; j < n_dim; j++) {
ir_node *n = get_array_lower_bound(tp, j);
if (n) irg_walk(n, pre, post, env);
......
......@@ -454,9 +454,9 @@ static void write_initializer(io_env_t *env, ir_initializer_t *ini)
break;
case IR_INITIALIZER_COMPOUND: {
unsigned i, n = get_initializer_compound_n_entries(ini);
fprintf(f, "%u ", n);
for (i = 0; i < n; i++)
size_t i, n = get_initializer_compound_n_entries(ini);
ir_fprintf(f, "%zu ", n);
for (i = 0; i < n; ++i)
write_initializer(env, get_initializer_compound_value(ini, i));
break;
}
......@@ -1157,6 +1157,12 @@ static unsigned read_unsigned(io_env_t *env)
return (unsigned) read_long(env);
}
static size_t read_size_t(io_env_t *env)
{
/* FIXME */
return (size_t) read_unsigned(env);
}
static void expect_list_begin(io_env_t *env)
{
skip_ws(env);
......@@ -1355,7 +1361,7 @@ static ir_initializer_t *read_initializer(io_env_t *env)
return get_initializer_null();
case IR_INITIALIZER_COMPOUND: {
unsigned i, n = (unsigned) read_long(env);
size_t i, n = read_size_t(env);
ir_initializer_t *ini = create_initializer_compound(n);
for (i = 0; i < n; i++) {
ir_initializer_t *curini = read_initializer(env);
......
......@@ -5650,7 +5650,7 @@ static ir_node *transform_node_Call(ir_node *call)
ir_graph *irg;
type_dbg_info *tdb;
dbg_info *db;
int i, n_res, n_param;
size_t i, n_res, n_param;
ir_variadicity var;
if (! is_Proj(callee))
......
......@@ -283,8 +283,8 @@ static void copy_frame_entities(ir_graph *from, ir_graph *to)
{
ir_type *from_frame = get_irg_frame_type(from);
ir_type *to_frame = get_irg_frame_type(to);
int n_members = get_class_n_members(from_frame);
int i;
size_t n_members = get_class_n_members(from_frame);
size_t i;
assert(from_frame != to_frame);
for (i = 0; i < n_members; ++i) {
......@@ -1318,7 +1318,9 @@ static void analyze_irg_local_weights(inline_irg_env *env, ir_graph *irg)
{
ir_entity *ent = get_irg_entity(irg);
ir_type *mtp;
int nparams, i, proj_nr;
size_t nparams;
int i;
long proj_nr;
ir_node *irg_args, *arg;
mtp = get_entity_type(ent);
......
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