This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

PATCH: PR server/10306: gdb 6.8.50.20090622-cvs failed to build on Linux/ia64


On RHEL4/ia64, gdb 6.8.50.20090622-cvs failed to build:

/net/gnu-6/export/gnu/src/gdb/gdb/gdb/remote.c: In function `getpkt_or_notif_sane_1':
/net/gnu-6/export/gnu/src/gdb/gdb/gdb/remote.c:6383: warning: 'val'
might be used uninitialized in this function

This patch works for me. No regressions on Linux/ia32 and Linux/x86-64.
OK to install?

Thanks.


H.J.
---
2009-06-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR server/10306
	* remote.c (getpkt_or_notif_sane_1): Initialize val to 0.

--- gdb/remote.c.foo	2009-06-22 06:02:49.000000000 -0700
+++ gdb/remote.c	2009-06-22 07:32:13.000000000 -0700
@@ -6380,7 +6380,7 @@ getpkt_or_notif_sane_1 (char **buf, long
   int c;
   int tries;
   int timeout;
-  int val;
+  int val = -1;
 
   /* We're reading a new response.  Make sure we don't look at a
      previously cached response.  */


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