From: Matthias Braun Date: Thu, 14 Dec 2006 14:39:43 +0000 (+0000) Subject: warning fixes X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=1f335ea95cd82d50c613dbee022d5555be668f51;p=libfirm warning fixes --- diff --git a/ir/be/arm/arm_emitter.c b/ir/be/arm/arm_emitter.c index e85b82424..a4682a487 100644 --- a/ir/be/arm/arm_emitter.c +++ b/ir/be/arm/arm_emitter.c @@ -55,6 +55,9 @@ void arm_switch_section(FILE *f, sections sec) { case SECTION_DATA: fprintf(f, "\t.data\n"); break; + + default: + assert(0); } } diff --git a/ir/be/arm/arm_new_nodes.c b/ir/be/arm/arm_new_nodes.c index c8bb884f8..d7ad4b412 100644 --- a/ir/be/arm/arm_new_nodes.c +++ b/ir/be/arm/arm_new_nodes.c @@ -226,10 +226,10 @@ static int arm_dump_node(ir_node *n, FILE *F, dump_reason_t reason) { if (get_arm_value(n)) { if (is_arm_CopyB(n)) { - fprintf(F, "size = %u\n", get_tarval_long(get_arm_value(n))); + fprintf(F, "size = %lu\n", get_tarval_long(get_arm_value(n))); } else { if (mode_is_float(get_irn_mode(n))) { - fprintf(F, "float value = (%lf)\n", get_tarval_double(get_arm_value(n))); + fprintf(F, "float value = (%f)\n", (double) get_tarval_double(get_arm_value(n))); } else if (mode_is_int(get_irn_mode(n))) { long v = get_tarval_long(get_arm_value(n)); fprintf(F, "long value = %ld (0x%08lx)\n", v, v); @@ -613,7 +613,7 @@ typedef struct _opt_tuple { ir_op *op_shf_right; /**< shift operand on right */ } opt_tuple; -static const opt_tuple *opt_ops[iro_arm_last]; +//static const opt_tuple *opt_ops[iro_arm_last]; void arm_set_optimizers(void) { /* diff --git a/ir/be/ppc32/ppc32_emitter.c b/ir/be/ppc32/ppc32_emitter.c index 993a08d9d..fc785ea01 100644 --- a/ir/be/ppc32/ppc32_emitter.c +++ b/ir/be/ppc32/ppc32_emitter.c @@ -319,16 +319,6 @@ const lc_arg_env_t *ppc32_get_arg_env(void) { return env; } -/* - * Add a number to a prefix. This number will not be used a second time. - */ -static char *get_unique_label(char *buf, size_t buflen, const char *prefix) { - static unsigned long id = 0; - snprintf(buf, buflen, "%s%lu", prefix, ++id); - return buf; -} - - /** * Returns the target label for a control flow node. */ diff --git a/ir/be/ppc32/ppc32_transform_conv.c b/ir/be/ppc32/ppc32_transform_conv.c index 7515a1829..00afd254f 100644 --- a/ir/be/ppc32/ppc32_transform_conv.c +++ b/ir/be/ppc32/ppc32_transform_conv.c @@ -234,6 +234,7 @@ void init_block(void) * Constant generating code */ +#if 0 struct tv_ent { ir_entity *ent; tarval *tv; @@ -293,6 +294,7 @@ static ir_node *gen_fp_known_symconst(ppc32_transform_env_t *env, tarval *known_ return new_rd_SymConst_addr_ent(env->dbg, env->irg, ent, tp); } +#endif /** * Transforms a Const