This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] proc-api.c: uninitialized var warning fix.
- To: Michael Snyder <msnyder at cygnus dot com>
- Subject: Re: [RFA] proc-api.c: uninitialized var warning fix.
- From: Elena Zannoni <ezannoni at cygnus dot com>
- Date: Thu, 10 May 2001 17:04:48 -0400
- Cc: Elena Zannoni <ezannoni at cygnus dot com>, gdb-patches at sources dot redhat dot com
- References: <15098.741.725593.771628@kwikemart.cygnus.com><3AFAD67C.122EFC73@cygnus.com>
Michael Snyder writes:
> Elena Zannoni wrote:
> >
> > I am getting the following warning when compiling gdb on solaris:
> >
> > /source3/src/gdb/proc-api.c: In function `ioctl_with_trace':
> > /source3/src/gdb/proc-api.c:223: warning: `i' might be used uninitialized in this function
> >
> > OK to apply this patch?
>
> Sure, go ahead.
> Michael
>
Thanks
it is in.
Elena
>
>
> > 2001-05-09 Elena Zannoni <ezannoni@redhat.com>
> >
> > * proc-api.c (ioctl_with_trace): Fix uninitialized variable.
> >
> > Index: proc-api.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/proc-api.c,v
> > retrieving revision 1.9
> > diff -u -p -r1.9 proc-api.c
> > --- proc-api.c 2001/03/27 02:01:11 1.9
> > +++ proc-api.c 2001/05/10 02:34:55
> > @@ -219,7 +220,9 @@ static struct trans ioctl_table[] = {
> > int
> > ioctl_with_trace (int fd, long opcode, void *ptr, char *file, int line)
> > {
> > - int i, ret, arg1;
> > + int i = 0;
> > + int ret;
> > + int arg1;
> >
> > prepare_to_trace ();
> >
>