This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [msys+mingw] build error [-Werror=uninitialized]
On 03/16/2012 03:31 PM, asmwarrior wrote:
> TRY_CATCH (ex, RETURN_MASK_ERROR)
> {
> addr = value_as_address (vfn);
> }
> Which means addr is set before passed to print_function_pointer_address() call.
>
> So I'm not sure why gcc report such warning.
No idea on this. Patch below fixes the problem on my box.
--
Yao (éå)
2012-03-16 Yao Qi <yao@codesourcery.com>
index 0ba6ab5..5bfabe3 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -870,7 +870,7 @@ print_one_vtable (struct gdbarch *gdbarch, struct
value *value,
for (i = 0; i <= max_voffset; ++i)
{
struct value *vfn;
- CORE_ADDR addr;
+ CORE_ADDR addr = 0;
volatile struct gdb_exception ex;
printf_filtered ("[%d]: ", i);