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

fix cparser warnings

parent d5d7159c
......@@ -171,10 +171,6 @@
#define ARR_SETLEN(type, arr, n) \
((arr) = (type*) ir_arr_setlen((void *)(arr), (n), sizeof(type) * (n)))
/** Set a length smaller than the current length of the array. Do not
* resize. len must be <= ARR_LEN(arr). */
static inline void ARR_SHRINKLEN(void *arr, size_t new_len);
/**
* Resize a flexible array by growing it by delta elements.
*
......@@ -253,6 +249,8 @@ FIRM_API void ir_verify_arr(const void *elts);
#define ARR_ELTS_OFFS offsetof(ir_arr_descr, elts)
#define ARR_DESCR(elts) ((ir_arr_descr *)(void *)((char *)(elts) - ARR_ELTS_OFFS))
/** Set a length smaller than the current length of the array. Do not
* resize. len must be <= ARR_LEN(arr). */
static inline void ARR_SHRINKLEN(void *arr, size_t new_len)
{
ARR_VRFY(arr);
......
......@@ -545,10 +545,6 @@ FIRM_API ir_node *get_Sync_pred(const ir_node *node, int pos);
FIRM_API void set_Sync_pred(ir_node *node, int pos, ir_node *pred);
FIRM_API void add_Sync_pred(ir_node *node, ir_node *pred);
/** Return the projection number of a Proj node. */
FIRM_API long get_Proj_proj(const ir_node *node);
FIRM_API void set_Proj_proj(ir_node *node, long proj);
/**
* Returns non-zero if a node is a routine parameter.
*
......
......@@ -375,7 +375,7 @@ const arch_isa_if_t TEMPLATE_isa_if = {
TEMPLATE_emit_routine,
};
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch_TEMPLATE);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch_TEMPLATE)
void be_init_arch_TEMPLATE(void)
{
be_register_isa_if("TEMPLATE", &TEMPLATE_isa_if);
......
......@@ -555,7 +555,7 @@ const arch_isa_if_t amd64_isa_if = {
amd64_gen_routine,
};
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch_amd64);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch_amd64)
void be_init_arch_amd64(void)
{
be_register_isa_if("amd64", &amd64_isa_if);
......
......@@ -627,7 +627,7 @@ const arch_isa_if_t arm_isa_if = {
arm_gen_routine,
};
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch_arm);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch_arm)
void be_init_arch_arm(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
......
......@@ -2225,7 +2225,7 @@ void be_set_allocatable_regs(const ir_graph *irg,
}
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_abi);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_abi)
void be_init_abi(void)
{
FIRM_DBG_REGISTER(dbg, "firm.be.abi");
......
......@@ -295,7 +295,7 @@ void arch_dump_register_req(FILE *F, const arch_register_req_t *req,
}
if (req->width != 1) {
fprintf(F, " width:%u", req->width);
fprintf(F, " width:%d", req->width);
}
if (arch_register_req_is(req, aligned)) {
fprintf(F, " aligned");
......@@ -355,7 +355,7 @@ void arch_dump_reqs_and_registers(FILE *F, const ir_node *node)
fprintf(F, " not_scheduled");
}
}
fprintf(F, " (%d)\n", flags);
fprintf(F, " (%d)\n", (int)flags);
}
static const arch_register_req_t no_requirement = {
......
......@@ -722,7 +722,7 @@ static ir_node **create_block_schedule_ilp(ir_graph *irg, ir_exec_freq *execfreq
* |_| |_|\__,_|_|_| |_|
*
*/
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_blocksched);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_blocksched)
void be_init_blocksched(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
......
......@@ -554,7 +554,7 @@ void be_ra_chordal_color(be_chordal_env_t *chordal_env)
del_pset(env.pre_colored);
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_chordal);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_chordal)
void be_init_chordal(void)
{
static be_ra_chordal_coloring_t coloring = {
......
......@@ -293,7 +293,7 @@ ir_node *pre_process_constraints(be_chordal_env_t *env, be_insn_t **the_insn)
return perm;
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_chordal_common);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_chordal_common)
void be_init_chordal_common(void)
{
FIRM_DBG_REGISTER(dbg, "firm.be.chordal_common");
......
......@@ -458,7 +458,7 @@ static void be_ra_chordal_main(ir_graph *irg)
be_timer_pop(T_RA_OTHER);
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_chordal_main);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_chordal_main)
void be_init_chordal_main(void)
{
static be_ra_t be_ra_chordal_allocator = {
......
......@@ -658,7 +658,7 @@ int co_solve_heuristic(copy_opt_t *co)
return 0;
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur)
void be_init_copyheur(void)
{
static co_algo_info copyheur = {
......
......@@ -1132,7 +1132,7 @@ static void ifg_dump_at_end(FILE *file, void *self)
neighb_t *n;
if (ai->mst_parent != ai)
fprintf(file, "\tn%d -- n%d [style=dotted color=blue arrowhead=normal];\n", idx, get_irn_idx(ai->mst_parent->inh.irn));
fprintf(file, "\tn%d -- n%u [style=dotted color=blue arrowhead=normal];\n", idx, get_irn_idx(ai->mst_parent->inh.irn));
co_gs_foreach_neighb(a, n) {
int nidx = get_irn_idx(n->irn);
......@@ -1258,7 +1258,7 @@ int co_solve_heuristic_new(copy_opt_t *co)
return 0;
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur2);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur2)
void be_init_copyheur2(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
......
......@@ -1515,7 +1515,7 @@ static const lc_opt_table_entry_t options[] = {
LC_OPT_LAST
};
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur4);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur4)
void be_init_copyheur4(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
......
......@@ -136,7 +136,7 @@ void be_register_copyopt(const char *name, co_algo_info *copyopt)
be_add_module_to_list(&copyopts, name, copyopt);
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyopt);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyopt)
void be_init_copyopt(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
......@@ -155,7 +155,7 @@ static int void_algo(copy_opt_t *co)
return 0;
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copynone);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copynone)
void be_init_copynone(void)
{
static co_algo_info copyheur = {
......
......@@ -113,7 +113,7 @@ int curr_vals[ASIZE];
static ir_nodeset_t *all_phi_nodes;
static ir_nodeset_t *all_copy_nodes;
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copystat);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copystat)
void be_init_copystat(void)
{
FIRM_DBG_REGISTER(dbg, "firm.be.copystat");
......@@ -123,7 +123,7 @@ void be_init_copystat(void)
memset(curr_vals, 0, sizeof(curr_vals));
}
BE_REGISTER_MODULE_DESTRUCTOR(be_quit_copystat);
BE_REGISTER_MODULE_DESTRUCTOR(be_quit_copystat)
void be_quit_copystat(void)
{
if (all_phi_nodes != NULL) {
......@@ -242,7 +242,7 @@ void copystat_dump(ir_graph *irg)
buf[sizeof(buf) - 1] = '\0';
out = be_ffopen(buf, "stat", "wt");
fprintf(out, "%d\n", ASIZE);
fprintf(out, "%d\n", (int)ASIZE);
for (i = 0; i < ASIZE; i++) {
#if 0
if (i >= I_PHI_ARITY_S && i <= I_PHI_ARITY_E)
......
......@@ -105,7 +105,7 @@ static dbg_handle *create_null_dbgout_module(void)
return &null_handle;
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_dbgout);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_dbgout)
void be_init_dbgout(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
......
......@@ -342,7 +342,7 @@ void be_remove_dead_nodes_from_schedule(ir_graph *irg)
irg_block_walk_graph(irg, remove_dead_nodes_walker, NULL, &env);
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_irgmod);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_irgmod)
void be_init_irgmod(void)
{
FIRM_DBG_REGISTER(dbg, "firm.be.irgmod");
......
......@@ -302,7 +302,7 @@ void be_list_sched_graph(ir_graph *irg, const list_sched_selector_t *selector)
free(env.scheduled);
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_listsched);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_listsched)
void be_init_listsched(void)
{
FIRM_DBG_REGISTER(dbg, "firm.be.sched");
......
......@@ -903,7 +903,7 @@ void be_live_chk_compare(be_lv_t *lv, lv_chk_t *lvc)
obstack_free(&obst, NULL);
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_live);
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_live)
void be_init_live(void)
{
FIRM_DBG_REGISTER(dbg, "firm.be.liveness");
......
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