aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-10-17 08:43:46 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-10-17 08:43:46 +0000
commit3a182a69128689fa08bb1457183b714101576b32 (patch)
treedba0bd0f46f75e1413c8280858b4ce1f2d709f33 /gdb
parentad65951529827e3db99b092fa574f678aea68128 (diff)
downloadgdb-3a182a69128689fa08bb1457183b714101576b32.zip
gdb-3a182a69128689fa08bb1457183b714101576b32.tar.gz
gdb-3a182a69128689fa08bb1457183b714101576b32.tar.bz2
gdb/
Fix GCC false warning. * varobj.c (value_get_print_value) <str_addr>: Initialize it.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/varobj.c3
2 files changed, 7 insertions, 1 deletions
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 <jan.kratochvil@redhat.com>
+
+ Fix GCC false warning.
+ * varobj.c (value_get_print_value) <str_addr>: Initialize it.
+
2010-10-16 Pierre Muller <muller@ics.u-strasbg.fr>
* 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)