Commit 0df5e0ea authored by Matthias Braun's avatar Matthias Braun
Browse files

fix cparser warnings

parent d5d7159c
...@@ -602,7 +602,7 @@ void be_assure_state(ir_graph *irg, const arch_register_t *reg, void *func_env, ...@@ -602,7 +602,7 @@ void be_assure_state(ir_graph *irg, const arch_register_t *reg, void *func_env,
obstack_free(&env.obst, NULL); obstack_free(&env.obst, NULL);
} }
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_state); BE_REGISTER_MODULE_CONSTRUCTOR(be_init_state)
void be_init_state(void) void be_init_state(void)
{ {
FIRM_DBG_REGISTER(dbg, "firm.be.state"); FIRM_DBG_REGISTER(dbg, "firm.be.state");
......
...@@ -2171,7 +2171,7 @@ const arch_isa_if_t ia32_isa_if = { ...@@ -2171,7 +2171,7 @@ const arch_isa_if_t ia32_isa_if = {
ia32_emit, /* emit && done */ ia32_emit, /* emit && done */
}; };
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch_ia32); BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch_ia32)
void be_init_arch_ia32(void) void be_init_arch_ia32(void)
{ {
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be"); lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
......
...@@ -152,7 +152,7 @@ static void ia32_dump_node(FILE *F, ir_node *n, dump_reason_t reason) ...@@ -152,7 +152,7 @@ static void ia32_dump_node(FILE *F, ir_node *n, dump_reason_t reason)
fprintf(F, "AM Source (Load)"); fprintf(F, "AM Source (Load)");
break; break;
default: default:
fprintf(F, "unknown (%d)", get_ia32_op_type(n)); fprintf(F, "unknown (%d)", (int)get_ia32_op_type(n));
break; break;
} }
fprintf(F, "\n"); fprintf(F, "\n");
...@@ -165,7 +165,7 @@ static void ia32_dump_node(FILE *F, ir_node *n, dump_reason_t reason) ...@@ -165,7 +165,7 @@ static void ia32_dump_node(FILE *F, ir_node *n, dump_reason_t reason)
case ia32_am_binary: fputs("source (binary)\n", F); break; case ia32_am_binary: fputs("source (binary)\n", F); break;
default: default:
fprintf(F, "unknown (%d)\n", get_ia32_am_support(n)); fprintf(F, "unknown (%d)\n", (int)get_ia32_am_support(n));
break; break;
} }
...@@ -189,7 +189,7 @@ static void ia32_dump_node(FILE *F, ir_node *n, dump_reason_t reason) ...@@ -189,7 +189,7 @@ static void ia32_dump_node(FILE *F, ir_node *n, dump_reason_t reason)
fprintf(F, "default_pn = %ld\n", get_ia32_default_pn(n)); fprintf(F, "default_pn = %ld\n", get_ia32_default_pn(n));
} else if (is_ia32_CMovcc(n) || is_ia32_Setcc(n) || is_ia32_Jcc(n)) { } else if (is_ia32_CMovcc(n) || is_ia32_Setcc(n) || is_ia32_Jcc(n)) {
ia32_attr_t *attr = get_ia32_attr(n); ia32_attr_t *attr = get_ia32_attr(n);
fprintf(F, "condition_code = 0x%X\n", get_ia32_condcode(n)); fprintf(F, "condition_code = 0x%X\n", (unsigned)get_ia32_condcode(n));
fprintf(F, "ins_permuted = %u \n", attr->data.ins_permuted); fprintf(F, "ins_permuted = %u \n", attr->data.ins_permuted);
} }
else if (is_ia32_CopyB(n) || is_ia32_CopyB_i(n)) { else if (is_ia32_CopyB(n) || is_ia32_CopyB_i(n)) {
......
...@@ -110,7 +110,7 @@ static void sparc_dump_node(FILE *F, ir_node *n, dump_reason_t reason) ...@@ -110,7 +110,7 @@ static void sparc_dump_node(FILE *F, ir_node *n, dump_reason_t reason)
if (has_jmp_cond_attr(n)) { if (has_jmp_cond_attr(n)) {
const sparc_jmp_cond_attr_t *attr const sparc_jmp_cond_attr_t *attr
= get_sparc_jmp_cond_attr_const(n); = get_sparc_jmp_cond_attr_const(n);
fprintf(F, "relation: %d (%s)\n", attr->relation, fprintf(F, "relation: %d (%s)\n", (int)attr->relation,
get_relation_string(attr->relation)); get_relation_string(attr->relation));
fprintf(F, "unsigned: %s\n", attr->is_unsigned ? "true" : "false"); fprintf(F, "unsigned: %s\n", attr->is_unsigned ? "true" : "false");
} }
......
...@@ -404,7 +404,6 @@ static void print_enum_item_edge(FILE *F, const ir_type *tp, size_t item, const ...@@ -404,7 +404,6 @@ static void print_enum_item_edge(FILE *F, const ir_type *tp, size_t item, const
/* global and ahead declarations */ /* global and ahead declarations */
/*-----------------------------------------------------------------*/ /*-----------------------------------------------------------------*/
static void dump_node_with_edges(ir_node *n, void *env);
static void dump_loop_nodes_into_graph(FILE *F, ir_graph *irg); static void dump_loop_nodes_into_graph(FILE *F, ir_graph *irg);
/*-----------------------------------------------------------------*/ /*-----------------------------------------------------------------*/
...@@ -2663,7 +2662,7 @@ void dump_loop(FILE *F, ir_loop *l) ...@@ -2663,7 +2662,7 @@ void dump_loop(FILE *F, ir_loop *l)
PRINT_NODEID(b); PRINT_NODEID(b);
fprintf(F, "\" label: \""); fprintf(F, "\" label: \"");
dump_node_opcode(F, b); dump_node_opcode(F, b);
fprintf(F, " %ld:%d", get_irn_node_nr(b), get_irn_idx(b)); fprintf(F, " %ld:%u", get_irn_node_nr(b), get_irn_idx(b));
fprintf(F, "\" status:clustered color:yellow\n"); fprintf(F, "\" status:clustered color:yellow\n");
/* dump the blocks edges */ /* dump the blocks edges */
...@@ -2690,7 +2689,7 @@ void dump_loop(FILE *F, ir_loop *l) ...@@ -2690,7 +2689,7 @@ void dump_loop(FILE *F, ir_loop *l)
PRINT_NODEID(b); PRINT_NODEID(b);
fprintf(F, "\" label: \""); fprintf(F, "\" label: \"");
dump_node_opcode(F, b); dump_node_opcode(F, b);
fprintf(F, " %ld:%d", get_irn_node_nr(b), get_irn_idx(b)); fprintf(F, " %ld:%u", get_irn_node_nr(b), get_irn_idx(b));
fprintf(F, "\" status:clustered color:lightblue\n"); fprintf(F, "\" status:clustered color:lightblue\n");
/* dump the nodes that go into the block */ /* dump the nodes that go into the block */
......
...@@ -60,7 +60,6 @@ optimization_state_t libFIRM_verb = 0; ...@@ -60,7 +60,6 @@ optimization_state_t libFIRM_verb = 0;
/* silence warnings */ /* silence warnings */
void set_opt_optimize(int value); void set_opt_optimize(int value);
int get_opt_optimize(void);
/* an external flag can be set and get from outside */ /* an external flag can be set and get from outside */
#define E_FLAG(name, value, def) \ #define E_FLAG(name, value, def) \
......
...@@ -171,7 +171,7 @@ ir_op *new_ir_op(unsigned code, const char *name, op_pin_state p, ...@@ -171,7 +171,7 @@ ir_op *new_ir_op(unsigned code, const char *name, op_pin_state p,
firm_set_default_operations(code, &res->ops); firm_set_default_operations(code, &res->ops);
firm_set_default_copy_attr(code, &res->ops); firm_set_default_copy_attr(code, &res->ops);
firm_set_default_verifyer(code, &res->ops); firm_set_default_verifier(code, &res->ops);
firm_set_default_reassoc(code, &res->ops); firm_set_default_reassoc(code, &res->ops);
add_irp_opcode(res); add_irp_opcode(res);
......
...@@ -82,6 +82,6 @@ do { \ ...@@ -82,6 +82,6 @@ do { \
/** /**
* Set the default verify_node and verify_proj_node operation for an ir_op_ops. * Set the default verify_node and verify_proj_node operation for an ir_op_ops.
*/ */
void firm_set_default_verifyer(unsigned code, ir_op_ops *ops); void firm_set_default_verifier(unsigned code, ir_op_ops *ops);
#endif #endif
...@@ -90,7 +90,7 @@ static void dump_matrix(FILE *f, pbqp_matrix_t *mat) ...@@ -90,7 +90,7 @@ static void dump_matrix(FILE *f, pbqp_matrix_t *mat)
void dump_edge(FILE *file, pbqp_edge_t *edge) void dump_edge(FILE *file, pbqp_edge_t *edge)
{ {
fputs("<tex>\n", file); fputs("<tex>\n", file);
fprintf(file, "\t\\overline\n{C}_{%d,%d}=\n", fprintf(file, "\t\\overline\n{C}_{%u,%u}=\n",
edge->src->index, edge->tgt->index); edge->src->index, edge->tgt->index);
dump_matrix(file, edge->costs); dump_matrix(file, edge->costs);
fputs("</tex><br>", file); fputs("</tex><br>", file);
...@@ -124,7 +124,7 @@ static void dump_edge_costs(pbqp_t *pbqp) ...@@ -124,7 +124,7 @@ static void dump_edge_costs(pbqp_t *pbqp)
void dump_node(FILE *file, pbqp_node_t *node) void dump_node(FILE *file, pbqp_node_t *node)
{ {
if (node) { if (node) {
fprintf(file, "\tc<sub>%d</sub> = ", node->index); fprintf(file, "\tc<sub>%u</sub> = ", node->index);
dump_vector(file, node->costs); dump_vector(file, node->costs);
fputs("<br>\n", file); fputs("<br>\n", file);
} }
...@@ -155,7 +155,7 @@ void pbqp_dump_graph(pbqp_t *pbqp) ...@@ -155,7 +155,7 @@ void pbqp_dump_graph(pbqp_t *pbqp)
for (src_index = 0; src_index < pbqp->num_nodes; ++src_index) { for (src_index = 0; src_index < pbqp->num_nodes; ++src_index) {
pbqp_node_t *node = get_node(pbqp, src_index); pbqp_node_t *node = get_node(pbqp, src_index);
if (node && !node_is_reduced(node)) { if (node && !node_is_reduced(node)) {
fprintf(pbqp->dump_file, "\t n%d;\n", src_index); fprintf(pbqp->dump_file, "\t n%u;\n", src_index);
} }
} }
...@@ -179,7 +179,7 @@ void pbqp_dump_graph(pbqp_t *pbqp) ...@@ -179,7 +179,7 @@ void pbqp_dump_graph(pbqp_t *pbqp)
continue; continue;
if (src_index < tgt_index) { if (src_index < tgt_index) {
fprintf(pbqp->dump_file, "\t n%d -- n%d;\n", src_index, fprintf(pbqp->dump_file, "\t n%u -- n%u;\n", src_index,
tgt_index); tgt_index);
} }
} }
......
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