aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-10-21 00:26:17 +0000
committerAlan Modra <amodra@gmail.com>2008-10-21 00:26:17 +0000
commit78aff5a5271ab14960fec98805bd1c295cab6d8d (patch)
tree43f6e4e4a3f01abe61b8bfad5fdada2d6de8050d /gas
parent1631ca86c3bde3a7b7089ade915f9aeea47b6034 (diff)
downloadgdb-78aff5a5271ab14960fec98805bd1c295cab6d8d.zip
gdb-78aff5a5271ab14960fec98805bd1c295cab6d8d.tar.gz
gdb-78aff5a5271ab14960fec98805bd1c295cab6d8d.tar.bz2
Remove unnecessary casts on obstack_alloc invocations.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-bfin.c4
-rw-r--r--gas/config/tc-m68k.c2
-rw-r--r--gas/config/tc-ns32k.c2
-rw-r--r--gas/frags.c2
-rw-r--r--gas/hash.c4
-rw-r--r--gas/symbols.c4
6 files changed, 9 insertions, 9 deletions
diff --git a/gas/config/tc-bfin.c b/gas/config/tc-bfin.c
index 6628900..c3b8aef 100644
--- a/gas/config/tc-bfin.c
+++ b/gas/config/tc-bfin.c
@@ -960,7 +960,7 @@ note_reloc2 (INSTR_T code, const char *symbol, int reloc, int value, int pcrel)
INSTR_T
gencode (unsigned long x)
{
- INSTR_T cell = (INSTR_T) obstack_alloc (&mempool, sizeof (struct bfin_insn));
+ INSTR_T cell = obstack_alloc (&mempool, sizeof (struct bfin_insn));
memset (cell, 0, sizeof (struct bfin_insn));
cell->value = (x);
return cell;
@@ -973,7 +973,7 @@ int count_insns;
static void *
allocate (int n)
{
- return (void *) obstack_alloc (&mempool, n);
+ return obstack_alloc (&mempool, n);
}
Expr_Node *
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index 2bf7453..4f2e2f8 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -4422,7 +4422,7 @@ md_begin (void)
obstack_begin (&robyn, 4000);
for (i = 0; i < m68k_numopcodes; i++)
{
- hack = slak = (struct m68k_incant *) obstack_alloc (&robyn, sizeof (struct m68k_incant));
+ hack = slak = obstack_alloc (&robyn, sizeof (struct m68k_incant));
do
{
ins = m68k_sorted_opcodes[i];
diff --git a/gas/config/tc-ns32k.c b/gas/config/tc-ns32k.c
index 66aeae8..509239b 100644
--- a/gas/config/tc-ns32k.c
+++ b/gas/config/tc-ns32k.c
@@ -880,7 +880,7 @@ bit_fix_new (int size, /* Length of bitfield. */
{
bit_fixS *bit_fixP;
- bit_fixP = (bit_fixS *) obstack_alloc (&notes, sizeof (bit_fixS));
+ bit_fixP = obstack_alloc (&notes, sizeof (bit_fixS));
bit_fixP->fx_bit_size = size;
bit_fixP->fx_bit_offset = offset;
diff --git a/gas/frags.c b/gas/frags.c
index 052e76f..1cad6a7 100644
--- a/gas/frags.c
+++ b/gas/frags.c
@@ -69,7 +69,7 @@ frag_alloc (struct obstack *ob)
(void) obstack_alloc (ob, 0);
oalign = obstack_alignment_mask (ob);
obstack_alignment_mask (ob) = 0;
- ptr = (fragS *) obstack_alloc (ob, SIZEOF_STRUCT_FRAG);
+ ptr = obstack_alloc (ob, SIZEOF_STRUCT_FRAG);
obstack_alignment_mask (ob) = oalign;
memset (ptr, 0, SIZEOF_STRUCT_FRAG);
return ptr;
diff --git a/gas/hash.c b/gas/hash.c
index 4a4768c..06fadcb 100644
--- a/gas/hash.c
+++ b/gas/hash.c
@@ -237,7 +237,7 @@ hash_insert (struct hash_control *table, const char *key, void *value)
++table->insertions;
#endif
- p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p));
+ p = obstack_alloc (&table->memory, sizeof (*p));
p->string = key;
p->hash = hash;
p->data = value;
@@ -274,7 +274,7 @@ hash_jam (struct hash_control *table, const char *key, void *value)
++table->insertions;
#endif
- p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p));
+ p = obstack_alloc (&table->memory, sizeof (*p));
p->string = key;
p->hash = hash;
p->data = value;
diff --git a/gas/symbols.c b/gas/symbols.c
index 7e4f982..660b2a4 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -137,7 +137,7 @@ symbol_create (const char *name, /* It is copied, the caller can destroy/modify.
preserved_copy_of_name = save_symbol_name (name);
- symbolP = (symbolS *) obstack_alloc (&notes, sizeof (symbolS));
+ symbolP = obstack_alloc (&notes, sizeof (symbolS));
/* symbol must be born in some fixed state. This seems as good as any. */
memset (symbolP, 0, sizeof (symbolS));
@@ -197,7 +197,7 @@ local_symbol_make (const char *name, segT section, valueT value, fragS *frag)
name_copy = save_symbol_name (name);
- ret = (struct local_symbol *) obstack_alloc (&notes, sizeof *ret);
+ ret = obstack_alloc (&notes, sizeof *ret);
ret->lsy_marker = NULL;
ret->lsy_name = name_copy;
ret->lsy_section = section;