From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115286 invoked by alias); 27 Mar 2015 15:18:04 -0000 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 Received: (qmail 115174 invoked by uid 89); 27 Mar 2015 15:18:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00,LIKELY_SPAM_BODY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: outpost17.zedat.fu-berlin.de Received: from outpost17.zedat.fu-berlin.de (HELO outpost17.zedat.fu-berlin.de) (130.133.4.110) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 27 Mar 2015 15:18:01 +0000 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by outpost.zedat.fu-berlin.de (Exim 4.85) with esmtp (envelope-from ) id <1YbW1G-003PQl-EW>; Fri, 27 Mar 2015 16:17:58 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.85) with esmtps (envelope-from ) id <1YbW1G-003FDv-D0>; Fri, 27 Mar 2015 16:17:58 +0100 Received: from login1.physik.fu-berlin.de ([160.45.66.207]) by mx.physik.fu-berlin.de with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YbW1C-0002bL-Ss; Fri, 27 Mar 2015 16:17:54 +0100 Received: from tburnus by login1.physik.fu-berlin.de with local (Exim 4.80 #3 (Debian)) id 1YbW1C-0005tv-MP; Fri, 27 Mar 2015 16:17:54 +0100 Date: Fri, 27 Mar 2015 15:18:00 -0000 From: Tobias Burnus To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: gdb fails to compile with GCC 4.4.7 (was: [PATCH V4 5/9] New probe type: DTrace USDT probes.) Message-ID: <20150327151754.GA21801@physik.fu-berlin.de> References: <20150326210014.GC13867@adacore.com> <20150327094653.GA29713@physik.fu-berlin.de> <20150327134252.GD13867@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150327134252.GD13867@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-03/txt/msg00908.txt.bz2 On Fri, Mar 27, 2015 at 06:42:52AM -0700, Joel Brobecker wrote: > > I think that looks spurious as the code looks fine (i.e. GCC is overzaelous), still, > > a "= NULL" should harm. > > Would you mind checking that the attached patch fixes the problem? Yes, it now also compiles with GCC 4.4. Thanks for the fix! Tobias > * dtrace-probe.c (dtrace_process_dof_probe): Initialize expr to NULL. > --- > gdb/dtrace-probe.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c > index ff7ce7d..3f2548d 100644 > --- a/gdb/dtrace-probe.c > +++ b/gdb/dtrace-probe.c > @@ -413,7 +413,7 @@ dtrace_process_dof_probe (struct objfile *objfile, > for (j = 0; j < ret->probe_argc; j++) > { > struct dtrace_probe_arg arg; > - struct expression *expr; > + struct expression *expr = NULL; > > /* Set arg.expr to ensure all fields in expr are initialized and > the compiler will not warn when arg is used. */ > -- > 1.9.1 >