Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H.J. Lu" <hongjiu.lu@intel.com>
To: GDB <gdb-patches@sourceware.org>
Subject: PATCH: PR server/10306: gdb 6.8.50.20090622-cvs failed to build on 	Linux/ia64
Date: Mon, 22 Jun 2009 14:48:00 -0000	[thread overview]
Message-ID: <20090622144811.GA22353@lucon.org> (raw)

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.  */


             reply	other threads:[~2009-06-22 14:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-22 14:48 H.J. Lu [this message]
2009-06-22 15:20 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090622144811.GA22353@lucon.org \
    --to=hongjiu.lu@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=hjl.tools@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox