This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] varobj.c fix -Wuninitialized warnings
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [rfa] varobj.c fix -Wuninitialized warnings
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Mon, 27 Nov 2000 09:25:15 +0000
- CC: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Organization: Red Hat Canada Ltd. - Toronto
- References: <3A221140.7C9E9FBE@cygnus.com>
Andrew Cagney wrote:
>
> 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?
>
Yes. Thank you.
Fernando
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;
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9