From cafe75b06b2346a00c5a53dedec28e83c11c3a6a Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 16 Mar 2012 08:18:09 +0000 Subject: [PATCH] gdb/ Fix false compilation warning. * gnu-v3-abi.c (print_one_vtable): Initialize ADDR. --- gdb/ChangeLog | 6 ++++++ gdb/gnu-v3-abi.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 476431539a1..e4c225a0771 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2012-03-16 Yao Qi + Jan Kratochvil + + Fix false compilation warning. + * gnu-v3-abi.c (print_one_vtable): Initialize ADDR. + 2012-03-15 Jonathan Larmour Pedro Alves diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 0ba6ab54f52..72ca2a16d0c 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -869,8 +869,9 @@ print_one_vtable (struct gdbarch *gdbarch, struct value *value, for (i = 0; i <= max_voffset; ++i) { + /* Initialize it just to avoid a GCC false warning. */ + CORE_ADDR addr = 0; struct value *vfn; - CORE_ADDR addr; volatile struct gdb_exception ex; printf_filtered ("[%d]: ", i); -- 2.30.2