]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bt-load.c, [...]: Remove unnecessary casts.
authorKazu Hirata <kazu@cs.umass.edu>
Mon, 22 Mar 2004 02:57:27 +0000 (02:57 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Mon, 22 Mar 2004 02:57:27 +0000 (02:57 +0000)
* bt-load.c, builtins.c, cfghooks.c, cfgrtl.c, gcse.c,
ggc-page.c, integrate.c, var-tracking.c, web.c: Remove
unnecessary casts.

From-SVN: r79811

gcc/ChangeLog
gcc/bt-load.c
gcc/builtins.c
gcc/cfghooks.c
gcc/cfgrtl.c
gcc/gcse.c
gcc/ggc-page.c
gcc/integrate.c
gcc/var-tracking.c
gcc/web.c

index f67a5564aed88dcb1bd94472b16f0f3dc86fe6ba..1478197c2c8b4ba13f7b87fe2d71bf40006dc268 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-21  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * bt-load.c, builtins.c, cfghooks.c, cfgrtl.c, gcse.c,
+       ggc-page.c, integrate.c, var-tracking.c, web.c: Remove
+       unnecessary casts.
+
 2004-03-22  Danny Smith  <dannysmith@users.sourceforge.net>
 
        PR target/14291
index 1a81c456e3a72784bbdb1e8fd7da87d7ba1375bc..0008f3c7fe839078d3ab89015c630f96adde265e 100644 (file)
@@ -1385,8 +1385,7 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
 
   while (!fibheap_empty (all_btr_defs))
     {
-      btr_def def =
-       (btr_def) fibheap_extract_min (all_btr_defs);
+      btr_def def = fibheap_extract_min (all_btr_defs);
       int min_cost = -fibheap_min_key (all_btr_defs);
       if (migrate_btr_def (def, min_cost))
        {
index 58565f7731984bf9ca51a07b98c55c08afa117c3..fd1b2950da42271871de762ebd7d2d7833e9a07d 100644 (file)
@@ -4650,7 +4650,7 @@ expand_builtin_printf (tree arglist, rtx target, enum machine_mode mode,
            {
              /* Create a NUL-terminated string that's one char shorter
                 than the original, stripping off the trailing '\n'.  */
-             char *newstr = (char *) alloca (len);
+             char *newstr = alloca (len);
              memcpy (newstr, fmt_str, len - 1);
              newstr[len - 1] = 0;
 
index 183d54e387594329c349519d23840e154d2d19db..9f70604c6f2b50146c1d1db42c0b9263a018a604 100644 (file)
@@ -206,8 +206,8 @@ dump_bb (basic_block bb, FILE *outf, int indent)
   edge e;
   char *s_indent;
  
-  s_indent = (char *) alloca ((size_t) indent + 1);
-  memset ((void *) s_indent, ' ', (size_t) indent);
+  s_indent = alloca ((size_t) indent + 1);
+  memset (s_indent, ' ', (size_t) indent);
   s_indent[indent] = '\0';
 
   fprintf (outf, ";;%s basic block %d, loop depth %d, count ",
index a1524e51c115e4cfb88d9e9fda4f3c51f27dbac0..20de6259fabbce1df1926205c04cc2e32649ed61 100644 (file)
@@ -1665,8 +1665,8 @@ rtl_dump_bb (basic_block bb, FILE *outf, int indent)
   rtx last;
   char *s_indent;
 
-  s_indent = (char *) alloca ((size_t) indent + 1);
-  memset ((void *) s_indent, ' ', (size_t) indent);
+  s_indent = alloca ((size_t) indent + 1);
+  memset (s_indent, ' ', (size_t) indent);
   s_indent[indent] = '\0';
 
   fprintf (outf, ";;%s Registers live at start: ", s_indent);
index d75d459f18b448eaee2797c2ec4633f78828c266..eb37e18244b85547e87191b641c4010c9667c13a 100644 (file)
@@ -8366,7 +8366,7 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn,
          ok_count += pred->count;
           if (EDGE_CRITICAL_P (pred))
             critical_count += pred->count;
-         occr = (struct unoccr *) gmalloc (sizeof (struct unoccr));
+         occr = gmalloc (sizeof (struct unoccr));
          occr->insn = avail_insn;
          occr->pred = pred;
          occr->next = avail_occrs;
@@ -8377,7 +8377,7 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn,
          not_ok_count += pred->count;
           if (EDGE_CRITICAL_P (pred))
             critical_count += pred->count;
-         unoccr = (struct unoccr *) gmalloc (sizeof (struct unoccr));
+         unoccr = gmalloc (sizeof (struct unoccr));
          unoccr->insn = NULL_RTX;
          unoccr->pred = pred;
          unoccr->next = unavail_occrs;
@@ -8616,8 +8616,7 @@ compute_hash_table_after_reload (struct hash_table *table)
   clear_modify_mem_tables ();
 
   /* Some working arrays used to track first and last set in each block.  */
-  reg_avail_info = (struct reg_avail_info*)
-                  gmalloc (max_gcse_regno * sizeof (struct reg_avail_info));
+  reg_avail_info = gmalloc (max_gcse_regno * sizeof (struct reg_avail_info));
 
   for (i = 0; i < max_gcse_regno; ++i)
     reg_avail_info[i].last_bb = NULL;
index a45c76a566a0c69638f18b716049fe29c4ddc55f..4fc68872fcfb2baac79b1c9ed09cf0e8d4b48cbb 100644 (file)
@@ -652,12 +652,12 @@ static inline char *
 alloc_anon (char *pref ATTRIBUTE_UNUSED, size_t size)
 {
 #ifdef HAVE_MMAP_ANON
-  char *page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE,
-                             MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+  char *page = mmap (pref, size, PROT_READ | PROT_WRITE,
+                    MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
 #endif
 #ifdef HAVE_MMAP_DEV_ZERO
-  char *page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE,
-                             MAP_PRIVATE, G.dev_zero_fd, 0);
+  char *page = mmap (pref, size, PROT_READ | PROT_WRITE,
+                    MAP_PRIVATE, G.dev_zero_fd, 0);
 #endif
 
   if (page == (char *) MAP_FAILED)
index b9f4681189350523b49c3957969f3fe1c66e7340..d715ef26222c0e0211f02817adae8d0039bdb31e 100644 (file)
@@ -1667,11 +1667,11 @@ copy_insn_list (rtx insns, struct inline_remap *map, rtx static_chain_value)
                  tree *mapped_block_p;
 
                  mapped_block_p
-                   = (tree *) bsearch (NOTE_BLOCK (insn),
-                                       &VARRAY_TREE (map->block_map, 0),
-                                       map->block_map->elements_used,
-                                       sizeof (tree),
-                                       find_block);
+                   = bsearch (NOTE_BLOCK (insn),
+                              &VARRAY_TREE (map->block_map, 0),
+                              map->block_map->elements_used,
+                              sizeof (tree),
+                              find_block);
 
                  if (!mapped_block_p)
                    abort ();
index 5da2376836654e91de896a13a4b4aa6df0ff2c2b..d26893bdfe09cc3dfccf074ba29b78303ead89e0 100644 (file)
@@ -1297,8 +1297,8 @@ dataflow_set_different_1 (void **slot, void *data)
   variable var1, var2;
 
   var1 = *(variable *) slot;
-  var2 = (variable) htab_find_with_hash (htab, var1->decl,
-                                        VARIABLE_HASH_VAL (var1->decl));
+  var2 = htab_find_with_hash (htab, var1->decl,
+                             VARIABLE_HASH_VAL (var1->decl));
   if (!var2)
     {
       dataflow_set_different_value = true;
@@ -1329,8 +1329,8 @@ dataflow_set_different_2 (void **slot, void *data)
   variable var1, var2;
 
   var1 = *(variable *) slot;
-  var2 = (variable) htab_find_with_hash (htab, var1->decl,
-                                        VARIABLE_HASH_VAL (var1->decl));
+  var2 = htab_find_with_hash (htab, var1->decl,
+                             VARIABLE_HASH_VAL (var1->decl));
   if (!var2)
     {
       dataflow_set_different_value = true;
@@ -1671,8 +1671,8 @@ vt_find_locations (void)
 
   /* Compute reverse completion order of depth first search of the CFG
      so that the data-flow runs faster.  */
-  rc_order = (int *) xmalloc (n_basic_blocks * sizeof (int));
-  bb_order = (int *) xmalloc (last_basic_block * sizeof (int));
+  rc_order = xmalloc (n_basic_blocks * sizeof (int));
+  bb_order = xmalloc (last_basic_block * sizeof (int));
   flow_depth_first_order_compute (NULL, rc_order);
   for (i = 0; i < n_basic_blocks; i++)
     bb_order[rc_order[i]] = i;
@@ -2272,8 +2272,8 @@ emit_notes_for_differences_1 (void **slot, void *data)
   variable old_var, new_var;
 
   old_var = *(variable *) slot;
-  new_var = (variable) htab_find_with_hash (new_vars, old_var->decl,
-                                           VARIABLE_HASH_VAL (old_var->decl));
+  new_var = htab_find_with_hash (new_vars, old_var->decl,
+                                VARIABLE_HASH_VAL (old_var->decl));
 
   if (!new_var)
     {
@@ -2305,8 +2305,8 @@ emit_notes_for_differences_2 (void **slot, void *data)
   variable old_var, new_var;
 
   new_var = *(variable *) slot;
-  old_var = (variable) htab_find_with_hash (old_vars, new_var->decl,
-                                           VARIABLE_HASH_VAL (new_var->decl));
+  old_var = htab_find_with_hash (old_vars, new_var->decl,
+                                VARIABLE_HASH_VAL (new_var->decl));
   if (!old_var)
     {
       /* Variable has appeared.  */
index 7d1f39e43eb6d54a1768c27f5f918eb0c384d8c5..af006bfaf5053cadeb4572b383e22076bddfd505 100644 (file)
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -267,12 +267,10 @@ web_main (void)
   df = df_init ();
   df_analyze (df, 0, DF_UD_CHAIN | DF_EQUIV_NOTES);
 
-  def_entry =
-    (struct web_entry *) xcalloc (df->n_defs, sizeof (struct web_entry));
-  use_entry =
-    (struct web_entry *) xcalloc (df->n_uses, sizeof (struct web_entry));
-  used = (char *) xcalloc (max, sizeof (char));
-  use_addressof = (char *) xcalloc (max, sizeof (char));
+  def_entry = xcalloc (df->n_defs, sizeof (struct web_entry));
+  use_entry = xcalloc (df->n_uses, sizeof (struct web_entry));
+  used = xcalloc (max, sizeof (char));
+  use_addressof = xcalloc (max, sizeof (char));
 
   if (dump_file)
     df_dump (df, DF_UD_CHAIN | DF_DU_CHAIN, dump_file);