From 3436505436d26654ff014fe4c3a115dbc3fc8464 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 9 Jan 2012 22:31:39 +0000 Subject: [PATCH] * gdbtypes.c (safe_parse_type): Initialize type to keep gcc happy. * varobj.c (varobj_set_value): Initialize val,value to keep gcc happy. --- gdb/ChangeLog | 5 +++++ gdb/gdbtypes.c | 2 +- gdb/varobj.c | 5 ++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bb10c6bed87..c01fefedef1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-01-09 Doug Evans + + * gdbtypes.c (safe_parse_type): Initialize type to keep gcc happy. + * varobj.c (varobj_set_value): Initialize val,value to keep gcc happy. + 2012-01-09 Keith Seitz * breakpoint.c (wrapper.h): Don't include. diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 9a570ac54d9..b09c1ec3bfb 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1674,7 +1674,7 @@ static struct type * safe_parse_type (struct gdbarch *gdbarch, char *p, int length) { struct ui_file *saved_gdb_stderr; - struct type *type; + struct type *type = NULL; /* Initialize to keep gcc happy. */ volatile struct gdb_exception except; /* Suppress error messages. */ diff --git a/gdb/varobj.c b/gdb/varobj.c index b17d3fda712..9c3166da5d8 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1359,13 +1359,12 @@ varobj_get_value (struct varobj *var) int varobj_set_value (struct varobj *var, char *expression) { - struct value *val; - + struct value *val = NULL; /* Initialize to keep gcc happy. */ /* The argument "expression" contains the variable's new value. We need to first construct a legal expression for this -- ugh! */ /* Does this cover all the bases? */ struct expression *exp; - struct value *value; + struct value *value = NULL; /* Initialize to keep gcc happy. */ int saved_input_radix = input_radix; char *s = expression; volatile struct gdb_exception except;