This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch committed: Don't initialize variables to themselves


This small patch cleans up a couple of cases where a variable is
initialized to itself.  This is more or less OK, but rather ugly, and
the C++ frontend complains.  Bootstrapped and tested on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian


2009-06-16  Ian Lance Taylor  <iant@google.com>

	* df-problems.c (df_byte_lr_alloc): Don't set problem_data to
	itself.
	* vec.c (vec_gc_o_reserve_1): Don't set alloc to itself.


Index: vec.c
===================================================================
--- vec.c	(revision 148544)
+++ vec.c	(working copy)
@@ -227,7 +227,7 @@ vec_gc_o_reserve_1 (void *vec, int reser
 		    bool exact MEM_STAT_DECL)
 {
   struct vec_prefix *pfx = (struct vec_prefix *) vec;
-  unsigned alloc = alloc = calculate_allocation (pfx, reserve, exact);
+  unsigned alloc = calculate_allocation (pfx, reserve, exact);
   
   if (!alloc)
     {
Index: df-problems.c
===================================================================
--- df-problems.c	(revision 148544)
+++ df-problems.c	(working copy)
@@ -2509,8 +2509,8 @@ df_byte_lr_alloc (bitmap all_blocks ATTR
   unsigned int regno;
   unsigned int index = 0;
   unsigned int max_reg = max_reg_num();
-  struct df_byte_lr_problem_data *problem_data 
-    = problem_data = XNEW (struct df_byte_lr_problem_data);
+  struct df_byte_lr_problem_data *problem_data
+    = XNEW (struct df_byte_lr_problem_data);
 
   df_byte_lr->problem_data = problem_data;
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]