Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom Tromey <tom@tromey.com>
Cc: Pedro Alves <palves@redhat.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH 7/7] Remove -Wno-narrowing from warnings.m4
Date: Mon, 27 Aug 2018 18:00:00 -0000	[thread overview]
Message-ID: <87y3cry9kh.fsf@tromey.com> (raw)
In-Reply-To: <8736uzzorn.fsf@tromey.com> (Tom Tromey's message of "Mon, 27 Aug	2018 11:46:04 -0600")

>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> I'm checking this in now.

I spoke a little too soon.  Rebasing showed a new instance of the
warning, which I've fixed as appended.

I'm pushing the series with this addition.

Tom

commit fb45de8f4132b8212bf88eaeef5eed7c9ca78a55
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Aug 27 11:55:39 2018 -0600

    Avoid -Wnarrowing warnings in aarch64-linux-tdep.c
    
    This avoids -Wnarrowing warnings in
    aarch64_linux_iterate_over_regset_sections, by adding some casts to
    int.
    
    2018-08-27  Tom Tromey  <tom@tromey.com>
    
            * aarch64-linux-tdep.c
            (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
            casts to int.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 52321a8c64e..03a97a56899 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2018-08-27  Tom Tromey  <tom@tromey.com>
+
+	* aarch64-linux-tdep.c
+	(aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
+	casts to int.
+
 2018-08-08  Tom Tromey  <tom@tromey.com>
 
 	* ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index 0d46acde5fa..dc2b89121a6 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -411,8 +411,8 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
       /* Create this on the fly in order to handle vector register sizes.  */
       const struct regcache_map_entry sve_regmap[] =
 	{
-	  { 32, AARCH64_SVE_Z0_REGNUM, tdep->vq * 16 },
-	  { 16, AARCH64_SVE_P0_REGNUM, tdep->vq * 16 / 8 },
+	  { 32, AARCH64_SVE_Z0_REGNUM, (int) (tdep->vq * 16) },
+	  { 16, AARCH64_SVE_P0_REGNUM, (int) (tdep->vq * 16 / 8) },
 	  { 1, AARCH64_SVE_FFR_REGNUM, 4 },
 	  { 1, AARCH64_FPSR_REGNUM, 4 },
 	  { 1, AARCH64_FPCR_REGNUM, 4 },


  reply	other threads:[~2018-08-27 18:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08 23:20 [PATCH 0/7] Remove -Wno-narrowing Tom Tromey
2018-08-08 23:20 ` [PATCH 1/7] Change completion_tracker to use char type Tom Tromey
2018-08-09 17:38   ` Pedro Alves
2018-08-09 18:42     ` Tom Tromey
2018-08-09 18:50       ` Pedro Alves
2018-08-08 23:20 ` [PATCH 3/7] Avoid -Wnarrowing warnings in struct tramp_frame instances Tom Tromey
2018-08-09 18:08   ` Pedro Alves
2018-08-09 18:17     ` Tom Tromey
2018-08-08 23:20 ` [PATCH 7/7] Remove -Wno-narrowing from warnings.m4 Tom Tromey
2018-08-09 18:10   ` Pedro Alves
2018-08-27 17:46     ` Tom Tromey
2018-08-27 18:00       ` Tom Tromey [this message]
2018-08-08 23:20 ` [PATCH 4/7] Fix two -Wnarrowing warnings in xtensa-tdep.h Tom Tromey
2018-08-09 18:09   ` Pedro Alves
2018-08-08 23:20 ` [PATCH 2/7] Use CORE_ADDR_MAX in various "breaks" arrays Tom Tromey
2018-08-09 18:08   ` Pedro Alves
2018-08-08 23:20 ` [PATCH 6/7] Avoid -Wnarrowing warnings in gdbserver Tom Tromey
2018-08-08 23:20 ` [PATCH 5/7] Avoid -Wnarrowing warnings in ppc64-tdep.c 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=87y3cry9kh.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --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