This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
PATCH: PR server/10306: gdb 6.8.50.20090622-cvs failed to build on Linux/ia64
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GDB <gdb-patches at sourceware dot org>
- Date: Mon, 22 Jun 2009 07:48:11 -0700
- Subject: PATCH: PR server/10306: gdb 6.8.50.20090622-cvs failed to build on Linux/ia64
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
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. */