Re: Patch: implement new dynamic varobj spec

Matt Rice
2009-09-19T12:01:43Z

[-- Attachment #1: Type: text/plain, Size: 471 bytes --]

On Tue, Sep 15, 2009 at 11:48 AM, Tom Tromey <tromey@redhat.com> wrote:
> Thanks. I am checking in the appended.

gcc 4.5 gets ‘children_changed’ may be used uninitialized in this function,
even though update_dynamic_varobj_children sets it unconditionally,
seems conservative not to rely on the other function to initialize it
through the pointer passed.

09-19-2009 Matt Rice <ratmice@gmail.com>

* varobj.c (varobj_update): Initialize children_changed.

[-- Attachment #2: foo.diff --]
[-- Type: application/octet-stream, Size: 401 bytes --]

diff --git a/gdb/varobj.c b/gdb/varobj.c
index 7235635..8f22156 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1758,7 +1758,7 @@ VEC(varobj_update_result) *varobj_update (struct varobj **varp, int explicit)
if (v->pretty_printer)
{
VEC (varobj_p) *changed = 0, *new = 0, *unchanged = 0;
- int i, children_changed;
+ int i, children_changed = 0;

if (v->frozen)
continue;