From 95d3605c857bdb4b9eb11eb15c6ec328a4f9123d Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 20 Jun 2007 10:38:32 +0000 Subject: [PATCH] Fix warning, remove unnecessary casts. [r14658] --- ir/be/TEMPLATE/TEMPLATE_new_nodes.c | 4 ++-- ir/be/arm/arm_new_nodes.c | 4 ++-- ir/be/ia32/ia32_new_nodes.c | 2 +- ir/be/mips/mips_new_nodes.c | 2 +- ir/be/ppc32/ppc32_new_nodes.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ir/be/TEMPLATE/TEMPLATE_new_nodes.c b/ir/be/TEMPLATE/TEMPLATE_new_nodes.c index 8002c7cff..fe14beaaf 100644 --- a/ir/be/TEMPLATE/TEMPLATE_new_nodes.c +++ b/ir/be/TEMPLATE/TEMPLATE_new_nodes.c @@ -375,8 +375,8 @@ void init_TEMPLATE_attributes(ir_node *node, arch_irn_flags_t flags, attr->out_req = out_reqs; attr->in_req = in_reqs; - attr->slots = NEW_ARR_D(arch_register_t*, obst, n_res); - memset((arch_register_t **)attr->slots, 0, n_res * sizeof(attr->slots[0])); + attr->slots = NEW_ARR_D(const arch_register_t*, obst, n_res); + memset(attr->slots, 0, n_res * sizeof(attr->slots[0])); } /*************************************************************************************** diff --git a/ir/be/arm/arm_new_nodes.c b/ir/be/arm/arm_new_nodes.c index 3a98f6985..d8fda8cee 100644 --- a/ir/be/arm/arm_new_nodes.c +++ b/ir/be/arm/arm_new_nodes.c @@ -530,7 +530,7 @@ arm_shift_modifier get_arm_shift_modifier(const ir_node *node) { } /* Set the ARM machine node attributes to default values. */ -void init_arm_attributes(ir_node *node, int flags, const arch_register_req_t ** in_reqs, +static void init_arm_attributes(ir_node *node, int flags, const arch_register_req_t ** in_reqs, const arch_register_req_t ** out_reqs, const be_execution_unit_t ***execution_units, int n_res, unsigned latency) { ir_graph *irg = get_irn_irg(node); @@ -547,7 +547,7 @@ void init_arm_attributes(ir_node *node, int flags, const arch_register_req_t ** memset(attr->out_flags, 0, n_res * sizeof(attr->out_flags[0])); attr->slots = NEW_ARR_D(const arch_register_t*, obst, n_res); - memset((arch_register_t **)attr->slots, 0, n_res * sizeof(attr->slots[0])); + memset(attr->slots, 0, n_res * sizeof(attr->slots[0])); } /*************************************************************************************** diff --git a/ir/be/ia32/ia32_new_nodes.c b/ir/be/ia32/ia32_new_nodes.c index aa2c9e10b..995b37f4c 100644 --- a/ir/be/ia32/ia32_new_nodes.c +++ b/ir/be/ia32/ia32_new_nodes.c @@ -1185,7 +1185,7 @@ void init_ia32_attributes(ir_node *node, arch_irn_flags_t flags, memset(attr->out_flags, 0, n_res * sizeof(attr->out_flags[0])); attr->slots = NEW_ARR_D(const arch_register_t*, obst, n_res); - memset(( arch_register_t **)attr->slots, 0, n_res * sizeof(attr->slots[0])); + memset(attr->slots, 0, n_res * sizeof(attr->slots[0])); } void diff --git a/ir/be/mips/mips_new_nodes.c b/ir/be/mips/mips_new_nodes.c index 289e608ac..3683fa45a 100644 --- a/ir/be/mips/mips_new_nodes.c +++ b/ir/be/mips/mips_new_nodes.c @@ -380,7 +380,7 @@ void init_mips_attributes(ir_node *node, arch_irn_flags_t flags, attr->in_req = in_reqs; attr->slots = NEW_ARR_D(const arch_register_t*, obst, n_res); - memset((arch_register_t **)attr->slots, 0, n_res * sizeof(attr->slots[0])); + memset(attr->slots, 0, n_res * sizeof(attr->slots[0])); } static diff --git a/ir/be/ppc32/ppc32_new_nodes.c b/ir/be/ppc32/ppc32_new_nodes.c index c816b065e..d7ec1e81a 100644 --- a/ir/be/ppc32/ppc32_new_nodes.c +++ b/ir/be/ppc32/ppc32_new_nodes.c @@ -508,7 +508,7 @@ void init_ppc32_attributes(ir_node *node, int flags, attr->data.empty = NULL; attr->slots = NEW_ARR_D(const arch_register_t*, obst, n_res); - memset((arch_register_t **)attr->slots, 0, n_res * sizeof(attr->slots[0])); + memset(attr->slots, 0, n_res * sizeof(attr->slots[0])); } -- 2.20.1