Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix windows-nat.c for -Wnarrowing
Date: Wed, 29 Aug 2018 18:39:00 -0000	[thread overview]
Message-ID: <88f0fbca-f10a-9139-f96a-7934e10a937c@redhat.com> (raw)
In-Reply-To: <20180829174253.18507-1-tom@tromey.com>

On 08/29/2018 06:42 PM, Tom Tromey wrote:

> gdb/ChangeLog
> 2018-08-29  Tom Tromey  <tom@tromey.com>
> 
> 	* windows-nat.c (struct xlate_exception) <them>: Change type to
> 	DWORD.
> 	(xlate): Fix formatting.
> 	(struct xlate_exception, xlate): Comment out.

This is OK as is.

> -static const struct xlate_exception
> -  xlate[] =
> +static const struct xlate_exception xlate[] =
>  {
>    {EXCEPTION_ACCESS_VIOLATION, GDB_SIGNAL_SEGV},
>    {STATUS_STACK_OVERFLOW, GDB_SIGNAL_SEGV},
> @@ -298,8 +300,10 @@ static const struct xlate_exception
>    {DBG_CONTROL_C, GDB_SIGNAL_INT},
>    {EXCEPTION_SINGLE_STEP, GDB_SIGNAL_TRAP},
>    {STATUS_FLOAT_DIVIDE_BY_ZERO, GDB_SIGNAL_FPE},
> -  {-1, GDB_SIGNAL_UNKNOWN}};
> +  {-1, GDB_SIGNAL_UNKNOWN}
> +};
I guess that -1 would still cause a -Wnarrowing warning.
If so, it'd be easily fixable by removing that terminator
entry and using range-for in the other #if 0 block.
Just thinking out loud.  Please don't bother.

Thanks,
Pedro Alves


  reply	other threads:[~2018-08-29 18:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 17:43 Tom Tromey
2018-08-29 18:39 ` Pedro Alves [this message]
2018-08-29 18:58   ` Tom Tromey
2018-08-29 19:01     ` Tom Tromey
2018-08-29 19:09       ` Pedro Alves
2018-08-29 19:31         ` Tom Tromey
2018-08-29 19:16       ` Eli Zaretskii
2018-08-29 19:22         ` Tom Tromey
2018-08-29 19:29           ` Eli Zaretskii
2018-08-29 19:33             ` Eli Zaretskii
2018-08-29 19:35               ` Tom Tromey
2018-08-29 19:38                 ` Eli Zaretskii
2018-08-29 19:34             ` Tom Tromey

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=88f0fbca-f10a-9139-f96a-7934e10a937c@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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