gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 29 Mar 2011 16:21:24 +0000 (16:21 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 29 Mar 2011 16:21:24 +0000 (16:21 +0000)
Fix false GCC warning.
* infcall.c (find_function_addr): Initialize funaddr.

gdb/ChangeLog
gdb/infcall.c

index a2bc9a1fcd498b66a7a9b75efcb76da0db6bb713..3a53ad21ad14e8ca31dd6693f2724dc5693979a8 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-29  Andreas Tobler  <andreast-list@fgznet.ch>
+
+       Fix false GCC warning.
+       * infcall.c (find_function_addr): Initialize funaddr.
+
 2011-03-29  Pierre Muller  <muller@ics.u-strasbg.fr>
 
        Fix mingw compilation with --enable-targets=all.
index ca23704a7141839b21a874ba57c446f270b4dc89..3f9c8713cf2a2ebf771c230be4ed9a5fb6e0509b 100644 (file)
@@ -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.  */
This page took 0.027428 seconds and 4 git commands to generate.