From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15761 invoked by alias); 22 Jun 2009 14:48:23 -0000 Received: (qmail 15710 invoked by uid 22791); 22 Jun 2009 14:48:19 -0000 X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL,BAYES_00,NO_DNS_FOR_FROM X-Spam-Check-By: sourceware.org Received: from mga06.intel.com (HELO orsmga101.jf.intel.com) (134.134.136.21) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Jun 2009 14:48:14 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 22 Jun 2009 07:38:57 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.107]) by orsmga001.jf.intel.com with ESMTP; 22 Jun 2009 07:48:02 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id DD1883B57CD; Mon, 22 Jun 2009 07:48:11 -0700 (PDT) Date: Mon, 22 Jun 2009 14:48:00 -0000 From: "H.J. Lu" To: GDB Subject: PATCH: PR server/10306: gdb 6.8.50.20090622-cvs failed to build on Linux/ia64 Message-ID: <20090622144811.GA22353@lucon.org> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00562.txt.bz2 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 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. */