From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8587 invoked by alias); 20 Aug 2014 16:28:12 -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 8577 invoked by uid 89); 20 Aug 2014 16:28:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f174.google.com Received: from mail-lb0-f174.google.com (HELO mail-lb0-f174.google.com) (209.85.217.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 20 Aug 2014 16:28:08 +0000 Received: by mail-lb0-f174.google.com with SMTP id c11so7084073lbj.33 for ; Wed, 20 Aug 2014 09:28:04 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.153.6.9 with SMTP id cq9mr4126913lad.48.1408552084352; Wed, 20 Aug 2014 09:28:04 -0700 (PDT) Received: by 10.25.23.204 with HTTP; Wed, 20 Aug 2014 09:28:04 -0700 (PDT) In-Reply-To: <53F4793A.6080205@redhat.com> References: <20140709103312.GA27884@host2.jankratochvil.net> <53BD2CE0.1000308@redhat.com> <20140709153121.GA7989@host2.jankratochvil.net> <53C41D5D.9030109@redhat.com> <20140716215838.GA29855@host2.jankratochvil.net> <53D0F72D.9010701@redhat.com> <20140815201332.GA2806@host2.jankratochvil.net> <53F3DF83.3020006@redhat.com> <53F46E74.5060107@redhat.com> <53F4793A.6080205@redhat.com> Date: Wed, 20 Aug 2014 16:28:00 -0000 Message-ID: Subject: Re: [PUSHED] value.c (value_contents_bits_eq): Initialize l,h for gcc, -Wall. (was: Re: [PATCH v2] Handle partially optimized out values similarly to unavailable values) From: Andrew Pinski To: Pedro Alves Cc: Jan Kratochvil , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00419.txt.bz2 On Wed, Aug 20, 2014 at 3:32 AM, Pedro Alves wrote: > On 08/20/2014 10:46 AM, Pedro Alves wrote: >> On 08/20/2014 01:54 AM, Andrew Pinski wrote: >>> On Tue, Aug 19, 2014 at 4:36 PM, Pedro Alves wrote: >> >> >>>> Great, I pushed this in then. >>> >>> This caused a build error for me: >>> >>> cc1: warnings being treated as errors >>> ../../gdb/value.c: In function =E2=80=98value_contents_eq=E2=80=99: >>> ../../gdb/value.c:830: error: =E2=80=98l=E2=80=99 may be used uninitial= ized in this function >>> ../../gdb/value.c:830: note: =E2=80=98l=E2=80=99 was declared here >>> ../../gdb/value.c:830: error: =E2=80=98h=E2=80=99 may be used uninitial= ized in this function >>> ../../gdb/value.c:830: note: =E2=80=98h=E2=80=99 was declared here >>> make[2]: *** [value.o] Error 1 >>> >>> Thanks, >>> Andrew Pinski >> >> Thanks Andrew. I'm looking. >> > > I can't trigger that, but should be fixed now. Yes this fixes the issue for me. Thanks, Andrew > > Thanks. > > ------------ > value.c (value_contents_bits_eq): Initialize l,h for gcc -Wall. > > gdb/ > * value.c (value_contents_bits_eq): Initialize l,h for gcc -Wall. > --- > gdb/ChangeLog | 4 ++++ > gdb/value.c | 2 +- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 55cc92c..c0b4f82 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,7 @@ > +2014-08-20 Pedro Alves > + > + * value.c (value_contents_bits_eq): Initialize l,h for gcc -Wall. > + > 2014-08-20 Yao Qi > > * amd64-tdep.c (amd64_classify): Add a blank line after the > diff --git a/gdb/value.c b/gdb/value.c > index b74f23a..09ee1ca 100644 > --- a/gdb/value.c > +++ b/gdb/value.c > @@ -827,7 +827,7 @@ value_contents_bits_eq (const struct value *val1, int= offset1, > > while (length > 0) > { > - ULONGEST l, h; > + ULONGEST l =3D 0, h =3D 0; /* init for gcc -Wall */ > int i; > > for (i =3D 0; i < 2; i++) > -- > 1.9.3 > > > > -- > Thanks, > Pedro Alves