aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
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/varobj.c
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/varobj.c')
-rw-r--r--gdb/varobj.c3
1 files changed, 2 insertions, 1 deletions
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)