From: Michael Beck Date: Tue, 21 Dec 2004 16:47:57 +0000 (+0000) Subject: removed C99 constructs X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=8881d93d56384f5f37104d692ef7c68b7f949325;p=libfirm removed C99 constructs [r4704] --- diff --git a/ir/ir/irprintf.c b/ir/ir/irprintf.c index 06dcd09d9..2d8e1238c 100644 --- a/ir/ir/irprintf.c +++ b/ir/ir/irprintf.c @@ -24,6 +24,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_INTTYPES_H +#include +#endif #include #include @@ -225,8 +228,8 @@ static void dump_with_settings(const appender_t *app, void *object, size_t limit if(settings->width >= 0) { int i; size_t n = strlen(str); - int lim = MIN(settings->width, limit); - int to_print = MIN(lim, n); + int lim = MIN(settings->width, (int)limit); + int to_print = MIN(lim, (int)n); int to_pad = to_print - lim; if(!settings->left_just) @@ -398,7 +401,7 @@ static void ir_common_vprintf(const appender_t *app, void *object, case len_long_long: { - long long arg = va_arg(args, long long); + int64_t arg = va_arg(args, int64_t); snprintf(buf, sizeof(buf), fmt_str, arg); } break; diff --git a/ir/ir/irvrfy.c b/ir/ir/irvrfy.c index 62c86f2e5..f4ad315bf 100644 --- a/ir/ir/irvrfy.c +++ b/ir/ir/irvrfy.c @@ -1055,7 +1055,9 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg) break; - case iro_Store: + case iro_Store: { + entity *target; + op1mode = get_irn_mode(in[1]); op2mode = get_irn_mode(in[2]); op3mode = get_irn_mode(in[3]); @@ -1066,7 +1068,7 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg) ); ASSERT_AND_RET(mymode == mode_T, "Store node", 0); - entity *target = get_ptr_entity(in[2]); + target = get_ptr_entity(in[2]); if (vrfy_entities && target && get_irg_phase_state(current_ir_graph) == phase_high) { /* * If lowered code, any Sels that add 0 may be removed, causing @@ -1078,6 +1080,7 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg) } break; + } case iro_Alloc: op1mode = get_irn_mode(in[1]); diff --git a/ir/ir/pseudo_irg.c b/ir/ir/pseudo_irg.c index 1df6053b6..968750d98 100644 --- a/ir/ir/pseudo_irg.c +++ b/ir/ir/pseudo_irg.c @@ -57,10 +57,12 @@ new_pseudo_ir_graph(entity *ent, int n_loc) { /** Returns true ir ir_graph is pseudo graph. */ int is_pseudo_ir_graph(ir_graph *irg) { + int i, n_pseudo_irgs; + assert(irg && "nothing here"); assert(is_ir_graph(irg) && "no ir_graph given"); - int i, n_pseudo_irgs = get_irp_n_pseudo_irgs(); + n_pseudo_irgs = get_irp_n_pseudo_irgs(); for (i = 0; i < n_pseudo_irgs; ++i) { if (irg == get_irp_pseudo_irg(i)) return true; }