This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[rfa] varobj.c fix -Wuninitialized warnings
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: [rfa] varobj.c fix -Wuninitialized warnings
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 27 Nov 2000 18:46:08 +1100
Hello,
The attatched supresses a few -Wuninitialized warnings in varobj.c. It
also tweeks the Makefile so that varobj.c can be compiled with the
-Werror option.
ok?
Andrew
Mon Nov 27 18:19:46 2000 Andrew Cagney <cagney@b1.cygnus.com>
* Makefile.in (varobj.o): Delete special compile rule
suppressing -Werror flag.
* varobj.c (varobj_create): Initialize ``old_fi''.
(varobj_update): Initialize ``templist''.
Index: varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/varobj.c,v
retrieving revision 1.12
diff -p -r1.12 varobj.c
*** varobj.c 2000/11/10 01:19:47 1.12
--- varobj.c 2000/11/27 07:48:46
*************** varobj_create (char *objname,
*** 411,417 ****
enum varobj_type type)
{
struct varobj *var;
! struct frame_info *fi, *old_fi;
struct block *block;
struct cleanup *old_chain;
--- 411,418 ----
enum varobj_type type)
{
struct varobj *var;
! struct frame_info *fi;
! struct frame_info *old_fi = NULL;
struct block *block;
struct cleanup *old_chain;
*************** varobj_update (struct varobj *var, struc
*** 883,889 ****
int error2;
struct varobj *v;
struct varobj **cv;
! struct varobj **templist;
value_ptr new;
struct vstack *stack = NULL;
struct vstack *result = NULL;
--- 884,890 ----
int error2;
struct varobj *v;
struct varobj **cv;
! struct varobj **templist = NULL;
value_ptr new;
struct vstack *stack = NULL;
struct vstack *result = NULL;