]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove unnecessary casts on obstack_alloc invocations.
authorAlan Modra <amodra@gmail.com>
Tue, 21 Oct 2008 00:26:17 +0000 (00:26 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 21 Oct 2008 00:26:17 +0000 (00:26 +0000)
binutils/windmc.c
binutils/windres.c
gas/config/tc-bfin.c
gas/config/tc-m68k.c
gas/config/tc-ns32k.c
gas/frags.c
gas/hash.c
gas/symbols.c

index 283c2657506d79dcf875e6046cc8b7c38e0d3977..9392d657647d3c973d79943017c09012da2f45ba 100644 (file)
@@ -175,7 +175,7 @@ res_init (void)
 void *
 res_alloc (rc_uint_type bytes)
 {
-  return (void *) obstack_alloc (&res_obstack, (size_t) bytes);
+  return obstack_alloc (&res_obstack, (size_t) bytes);
 }
 
 static FILE *
index e68a504cf3c2da1cf57cf5feceffb818d6942b1f..98ce1652a0f26fc4423300f93fee9e9d49102d12 100644 (file)
@@ -157,7 +157,7 @@ res_init (void)
 void *
 res_alloc (rc_uint_type bytes)
 {
-  return (void *) obstack_alloc (&res_obstack, (size_t) bytes);
+  return obstack_alloc (&res_obstack, (size_t) bytes);
 }
 
 /* We also use an obstack to save memory used while writing out a set
@@ -178,7 +178,7 @@ reswr_init (void)
 void *
 reswr_alloc (rc_uint_type bytes)
 {
-  return (void *) obstack_alloc (&reswr_obstack, (size_t) bytes);
+  return obstack_alloc (&reswr_obstack, (size_t) bytes);
 }
 \f
 /* Open a file using the include directory search list.  */
index 66289009572dca9520dc0d3b85a71775d15c13a9..c3b8aefc87c239a7c0ec06ccc1d1f19441edd4e3 100644 (file)
@@ -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 *
index 2bf7453e63dac7b5cbddf85254875010f88c032a..4f2e2f8be78f81ff1fe26e3ad4226f3756c368a9 100644 (file)
@@ -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];
index 66aeae87178c16d78bb907a9e5f3924131991a7a..509239b5438fce69554b4906d94db07e8dc73873 100644 (file)
@@ -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;
index 052e76f076e0ce9ad25c92024cd2df3694c39b94..1cad6a71bfac7961df13ec89eda17a3c53d3dec6 100644 (file)
@@ -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;
index 4a4768c4af4a4bf6e69780d82d6b5a9b00974ebe..06fadcbf4d762487c9e5c6ca0fd12776c2fec380 100644 (file)
@@ -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;
index 7e4f982f388dc2529550374975e25142ebf49f4c..660b2a4f1449dc70bd147646faa47cd5e1aa16de 100644 (file)
@@ -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;