This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[RFA] proc-api.c: uninitialized var warning fix.



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?

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 ();
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]