From: Andrew Pinski <pinskia@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
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)
Date: Wed, 20 Aug 2014 16:28:00 -0000 [thread overview]
Message-ID: <CA+=Sn1mpor6sgUd_Uu4_eUM5Y0TdOQVvCynUMCkckcspdRtnSg@mail.gmail.com> (raw)
In-Reply-To: <53F4793A.6080205@redhat.com>
On Wed, Aug 20, 2014 at 3:32 AM, Pedro Alves <palves@redhat.com> 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 <palves@redhat.com> 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 ‘value_contents_eq’:
>>> ../../gdb/value.c:830: error: ‘l’ may be used uninitialized in this function
>>> ../../gdb/value.c:830: note: ‘l’ was declared here
>>> ../../gdb/value.c:830: error: ‘h’ may be used uninitialized in this function
>>> ../../gdb/value.c:830: note: ‘h’ 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 <palves@redhat.com>
> +
> + * value.c (value_contents_bits_eq): Initialize l,h for gcc -Wall.
> +
> 2014-08-20 Yao Qi <yao@codesourcery.com>
>
> * 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 = 0, h = 0; /* init for gcc -Wall */
> int i;
>
> for (i = 0; i < 2; i++)
> --
> 1.9.3
>
>
>
> --
> Thanks,
> Pedro Alves
next prev parent reply other threads:[~2014-08-20 16:28 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 10:33 [patchv2] Fix crash on optimized-out entry data values Jan Kratochvil
2014-07-09 11:52 ` Pedro Alves
2014-07-09 15:31 ` Jan Kratochvil
2014-07-11 16:07 ` [patchv3] " Jan Kratochvil
2014-07-14 7:02 ` Yao Qi
2014-07-14 8:32 ` Jan Kratochvil
2014-07-14 18:12 ` Pedro Alves
2014-07-14 18:47 ` [PATCH] Handle partially optimized out values similarly to unavailable values (Re: [patchv2] Fix crash on optimized-out entry data values) Pedro Alves
2014-07-17 8:04 ` Jan Kratochvil
2014-07-17 8:35 ` Jan Kratochvil
2014-07-17 13:38 ` Pedro Alves
2014-07-20 15:33 ` [read_frame_arg patch] " Jan Kratochvil
2014-07-22 19:33 ` Pedro Alves
2014-07-22 20:21 ` [commit+7.8] [read_frame_arg patch] Handle partially optimized out values similarly to unavailable values Jan Kratochvil
2014-08-05 17:16 ` Doug Evans
2014-08-14 18:25 ` Jan Kratochvil
2014-07-23 14:26 ` [commit] Remove setting value address for reference entry value target data value Jan Kratochvil
2014-07-24 12:51 ` [PATCH v2] Handle partially optimized out values similarly to unavailable values Pedro Alves
2014-08-15 20:13 ` Jan Kratochvil
2014-08-19 23:36 ` Pedro Alves
2014-08-20 0:55 ` Andrew Pinski
2014-08-20 9:46 ` Pedro Alves
2014-08-20 10:32 ` [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) Pedro Alves
2014-08-20 16:28 ` Andrew Pinski [this message]
2014-08-21 19:57 ` Regression for i686 gdb.dwarf2/pieces-optimized-out.exp [Re: [PATCH v2] Handle partially optimized out values similarly to unavailable values] Jan Kratochvil
2014-08-22 16:20 ` Pedro Alves
2014-08-24 19:56 ` Jan Kratochvil
2014-09-04 11:36 ` [pushed] " 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='CA+=Sn1mpor6sgUd_Uu4_eUM5Y0TdOQVvCynUMCkckcspdRtnSg@mail.gmail.com' \
--to=pinskia@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=palves@redhat.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