Commit d60e46b8 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Fix warnings

parent eb383da3
......@@ -356,7 +356,7 @@ static unsigned get_unique_label(void) {
static char *get_cfop_target(const ir_node *irn, char *buf) {
ir_node *bl = get_irn_link(irn);
snprintf(buf, SNPRINTF_BUF_LEN, "BLOCK_%d", get_irn_node_nr(bl));
snprintf(buf, SNPRINTF_BUF_LEN, "BLOCK_%ld", get_irn_node_nr(bl));
return buf;
}
......@@ -417,10 +417,10 @@ static void emit_arm_CondJmp(ir_node *irn, void *env) {
if (proj_num == pn_Cmp_False) {
/* always false: should not happen */
fprintf(out, "\tb BLOCK_%d\t\t\t/* false case */\n", get_irn_node_nr(false_block));
fprintf(out, "\tb BLOCK_%ld\t\t\t/* false case */\n", get_irn_node_nr(false_block));
} else if (proj_num == pn_Cmp_True) {
/* always true: should not happen */
fprintf(out, "\tb BLOCK_%d\t\t\t/* true case */\n", get_irn_node_nr(true_block));
fprintf(out, "\tb BLOCK_%ld\t\t\t/* true case */\n", get_irn_node_nr(true_block));
} else {
ir_node *block = get_nodes_block(irn);
......@@ -732,7 +732,6 @@ static void emit_be_Reload(const ir_node* irn, arm_emit_env_t *emit_env) {
static void emit_be_Perm(const ir_node* irn, arm_emit_env_t *emit_env) {
FILE *F = emit_env->out;
ir_mode *mode = get_irn_mode(irn);
const lc_arg_env_t *arm_env = arm_get_arg_env();
char cmd_buf[SNPRINTF_BUF_LEN], cmnt_buf[SNPRINTF_BUF_LEN];
......@@ -896,7 +895,7 @@ static void arm_emit_node(const ir_node *irn, void *env) {
void arm_gen_block(ir_node *block, void *env) {
ir_node *irn;
fprintf(((arm_emit_env_t *)env)->out, "BLOCK_%d:\n", get_irn_node_nr(block));
fprintf(((arm_emit_env_t *)env)->out, "BLOCK_%ld:\n", get_irn_node_nr(block));
sched_foreach(block, irn) {
arm_emit_node(irn, env);
}
......
......@@ -139,7 +139,6 @@ unsigned int arm_decode_imm_w_shift(tarval *tv) {
*/
static ir_node *create_const_graph_value(ir_node *irn, ir_node *block, unsigned int value) {
ir_node *result;
int negate = 0;
vals v, vn;
int cnt;
ir_mode *mode = get_irn_mode(irn);
......@@ -1124,7 +1123,6 @@ static ir_node *gen_FrameStore(ir_node *irn, arm_code_gen_t *cg) {
* move constants out of the start block
*/
void arm_move_consts(ir_node *node, void *env) {
arm_code_gen_t *cgenv = (arm_code_gen_t *)env;
int i;
if (is_Block(node))
......
......@@ -218,7 +218,7 @@ be_abi_call_flags_t be_abi_call_get_flags(const be_abi_call_t *call)
*
* @return the new ABI call object
*/
static be_abi_call_t *be_abi_call_new()
static be_abi_call_t *be_abi_call_new(void)
{
be_abi_call_t *call = xmalloc(sizeof(call[0]));
call->flags.val = 0;
......
......@@ -200,8 +200,8 @@ static void *co2_irn_init(phase_t *ph, ir_node *irn, void *data)
static int cmp_clouds_gt(const void *a, const void *b)
{
const co2_cloud_t **p = a;
const co2_cloud_t **q = b;
const co2_cloud_t * const *p = a;
const co2_cloud_t * const *q = b;
double c = CLOUD_WEIGHT(*p);
double d = CLOUD_WEIGHT(*q);
return QSORT_CMP(d, c);
......@@ -1053,7 +1053,8 @@ static void process(co2_t *env)
FILE *f;
ir_snprintf(buf, sizeof(buf), "ifg_%F_%s_cloud_%d.dot", env->co->irg, env->co->cls->name, i);
if(f = fopen(buf, "wt")) {
f = fopen(buf, "wt");
if(f != NULL) {
be_ifg_dump_dot(env->co->cenv->ifg, env->co->irg, f, &ifg_dot_cb, env);
fclose(f);
}
......@@ -1167,7 +1168,7 @@ static void ifg_dump_node_attr(FILE *f, void *self, ir_node *irn)
peri = 2;
if(cci->cloud && cci->cloud->mst_root)
snprintf(buf, sizeof(buf), "%+F", cci->cloud->mst_root->inh.irn);
ir_snprintf(buf, sizeof(buf), "%+F", cci->cloud->mst_root->inh.irn);
}
ir_fprintf(f, "label=\"%+F%s\" style=filled peripheries=%d color=%s shape=%s", irn, buf, peri,
......
......@@ -79,7 +79,6 @@ static void set_admissible_regs(be_java_coal_t *coal, copy_opt_t *co, ir_node *i
unsigned i;
arch_register_req_t req;
unsigned n_regs = co->cls->n_regs;
unsigned idx = get_irn_idx(irn);
arch_get_register_req(co->aenv, &req, irn, BE_OUT_POS(0));
if(arch_register_req_is(&req, limited)) {
......@@ -108,7 +107,6 @@ int co_solve_heuristic_java(copy_opt_t *co)
be_java_coal_t *coal;
ir_node *n, *m;
int max_idx = 0;
col_map = alloca(n_regs * sizeof(col_map[0]));
inv_col_map = alloca(n_regs * sizeof(inv_col_map[0]));
......
......@@ -1074,7 +1074,6 @@ static void appel_inter_block_aff(ir_node *bl, void *data)
for(j = 0, n = get_Block_n_cfgpreds(bl); j < n; ++j) {
ir_node *pred = get_Block_cfgpred_block(bl, j);
appel_block_info_t *pred_bli = phase_get_irn_data(&env->ph, pred);
int nr = appel_get_live_end_nr(env, pred, irn);
assert(nr >= 0);
......@@ -1087,7 +1086,6 @@ static void appel_inter_block_aff(ir_node *bl, void *data)
for(j = 0, n = get_Block_n_cfgpreds(bl); j < n; ++j) {
ir_node *pred = get_Block_cfgpred_block(bl, j);
appel_block_info_t *pred_bli = phase_get_irn_data(&env->ph, pred);
ir_node *op = get_irn_n(irn, j);
int nr = appel_get_live_end_nr(env, pred, op);
......
......@@ -290,7 +290,7 @@ void be_ifg_check_sorted(const be_ifg_t *ifg)
{
if(!node_is_in_irgs_storage(ifg->env->irg, n))
{
printf ("+%F is in ifg but not in the current irg!",n);
ir_printf("+%F is in ifg but not in the current irg!", n);
assert (node_is_in_irgs_storage(ifg->env->irg, n));
}
......
......@@ -70,7 +70,7 @@ typedef struct _ptr_iter_t {
/* PRIVATE FUNCTIONS */
static void *ptr_irn_data_init(phase_t *ph, const ir_node *irn, void *data)
static void *ptr_irn_data_init(phase_t *ph, ir_node *irn, void *data)
{
ptr_head_t *head = phase_alloc(ph, sizeof(*head));
INIT_LIST_HEAD(&head->list);
......
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