[rfa] varobj.c fix -Wuninitialized warnings
Fernando Nasser
fnasser@cygnus.com
Mon Nov 27 01:26:00 GMT 2000
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
More information about the Gdb-patches
mailing list