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]

[gcc-in-cxx] Don't initialize variable to itself


I committed this patch to the gcc-in-cxx branch to avoid initializing a
variable to itself.  This avoids a warning from the C++ frontend.

Ian


2009-03-04  Ian Lance Taylor  <iant@google.com>

	* vec.c (vec_gc_o_reserve_1): Don't initialize alloc to itself.


Index: vec.c
===================================================================
--- vec.c	(revision 144568)
+++ vec.c	(working copy)
@@ -226,7 +226,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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]