From: Jan Kratochvil Date: Sun, 17 Oct 2010 08:43:46 +0000 (+0000) Subject: gdb/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3a182a69128689fa08bb1457183b714101576b32;p=binutils-gdb.git gdb/ Fix GCC false warning. * varobj.c (value_get_print_value) : Initialize it. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c23a749e4ae..0e1a8bd88a1 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 2eacfa23172..09f91eb669d 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)