From: Jan Kratochvil Date: Tue, 29 Mar 2011 16:21:24 +0000 (+0000) Subject: gdb/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09b587083c5b3e18b5b9b86ba7b4cf9839658d0d;p=binutils-gdb.git gdb/ Fix false GCC warning. * infcall.c (find_function_addr): Initialize funaddr. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a2bc9a1fcd4..3a53ad21ad1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-03-29 Andreas Tobler + + Fix false GCC warning. + * infcall.c (find_function_addr): Initialize funaddr. + 2011-03-29 Pierre Muller Fix mingw compilation with --enable-targets=all. diff --git a/gdb/infcall.c b/gdb/infcall.c index ca23704a714..3f9c8713cf2 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -252,7 +252,8 @@ find_function_addr (struct value *function, struct type **retval_type) struct type *ftype = check_typedef (value_type (function)); struct gdbarch *gdbarch = get_type_arch (ftype); struct type *value_type = NULL; - CORE_ADDR funaddr; + /* Initialize it just to avoid a GCC false warning. */ + CORE_ADDR funaddr = 0; /* If it's a member function, just look at the function part of it. */