From 3a182a69128689fa08bb1457183b714101576b32 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sun, 17 Oct 2010 08:43:46 +0000 Subject: gdb/ Fix GCC false warning. * varobj.c (value_get_print_value) : Initialize it. --- gdb/ChangeLog | 5 +++++ gdb/varobj.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c23a749..0e1a8bd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-10-17 Jan Kratochvil + + Fix GCC false warning. + * varobj.c (value_get_print_value) : Initialize it. + 2010-10-16 Pierre Muller * p-typeprint.c (pascal_type_print_method_args): Fix problem in diff --git a/gdb/varobj.c b/gdb/varobj.c index 2eacfa2..09f91eb 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -2486,7 +2486,8 @@ value_get_print_value (struct value *value, enum varobj_display_formats format, long len = 0; char *encoding = NULL; struct gdbarch *gdbarch = NULL; - CORE_ADDR str_addr; + /* Initialize it just to avoid a GCC false warning. */ + CORE_ADDR str_addr = 0; int string_print = 0; if (value == NULL) -- cgit v1.1