Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: Re: [PATCH c++ 1/6] dwarf2read.c: Add cast
Date: Thu, 29 Oct 2015 17:10:00 -0000	[thread overview]
Message-ID: <CAFXXi0=6iv9vvZ0HRnGLo9H4UnjNKUoF6imUgUpDYDuV7uwwEQ@mail.gmail.com> (raw)
In-Reply-To: <1446123767-25046-2-git-send-email-simon.marchi@polymtl.ca>

On 29 October 2015 at 09:02, Simon Marchi <simon.marchi@polymtl.ca> wrote:
> There is no enum value representing 0.  It seems like the value of the
> name field is irrelevant here.
>
> gdb/ChangeLog:
>
>         * dwarf2read.c (partial_die_full_name): Add cast.
> ---
>  gdb/dwarf2read.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
> index d43c42e..baa288c 100644
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
> @@ -6854,7 +6854,7 @@ partial_die_full_name (struct partial_die_info *pdi,
>           struct dwarf2_cu *ref_cu = cu;
>
>           /* DW_FORM_ref_addr is using section offset.  */
> -         attr.name = 0;
> +         attr.name = (dwarf_attribute) 0;

Oops, here it should say (enum dwarf_attribute), so it works in C too.

>           attr.form = DW_FORM_ref_addr;
>           attr.u.unsnd = pdi->offset.sect_off;
>           die = follow_die_ref (NULL, &attr, &ref_cu);
> --
> 2.6.1
>


  reply	other threads:[~2015-10-29 14:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29 14:42 [PATCH c++ 0/6] A few C++ patches Simon Marchi
2015-10-29 14:58 ` [PATCH c++ 1/6] dwarf2read.c: Add cast Simon Marchi
2015-10-29 17:10   ` Simon Marchi [this message]
2015-10-29 17:49     ` Pedro Alves
2015-10-29 17:54       ` Simon Marchi
2015-10-29 15:01 ` [PATCH c++ 4/6] gdbserver/server.c: Cast return value of memmem Simon Marchi
2015-10-29 17:49   ` Pedro Alves
2015-10-29 15:01 ` [PATCH c++ 2/6] mdebugread.c: Add cast Simon Marchi
2015-10-29 17:10   ` Pedro Alves
2015-10-29 15:01 ` [PATCH c++ 5/6] Cast gdb_dlsym return value Simon Marchi
2015-10-29 17:50   ` Pedro Alves
2015-10-29 15:28 ` [PATCH c++ 3/6] Change type of write_qxfer_response parameter Simon Marchi
2015-10-29 17:49   ` Pedro Alves
2015-10-29 15:29 ` [PATCH c++ 6/6] Add a cast in jit_target_read_impl Simon Marchi
2015-10-29 17:50   ` 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='CAFXXi0=6iv9vvZ0HRnGLo9H4UnjNKUoF6imUgUpDYDuV7uwwEQ@mail.gmail.com' \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    /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