This is the mail archive of the archer@sourceware.org mailing list for the Archer 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] Fix obvious typo in gdb/varobj.c


Greetings,

Building current git source with gcc-4.3.1 fails with "'i' may be
used before initialized".

--
Paul Pluzhnikov

2008-10-13  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* gdb/varobj.c (update_dynamic_varobj_children): Fix typo.


diff --git a/gdb/varobj.c b/gdb/varobj.c
index e424d03..361f9d2 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -881,7 +881,7 @@ update_dynamic_varobj_children (struct varobj *var,
     {
       int i;
       children_changed = 1;
-      for (i = i; i < VEC_length (varobj_p, var->children); ++i)
+      for (i = 0; i < VEC_length (varobj_p, var->children); ++i)
 	varobj_delete (VEC_index (varobj_p, var->children, i), NULL, 0);
     }
   VEC_truncate (varobj_p, var->children, i);


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