From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 4/7] Fix two -Wnarrowing warnings in xtensa-tdep.h
Date: Wed, 08 Aug 2018 23:20:00 -0000 [thread overview]
Message-ID: <20180808232016.12777-5-tom@tromey.com> (raw)
In-Reply-To: <20180808232016.12777-1-tom@tromey.com>
This fixes a couple of -Wnarrowing warnings in xtensa-tdep.h, by
introducing some casts to unsigned.
gdb/ChangeLog
2018-08-08 Tom Tromey <tom@tromey.com>
* xtensa-tdep.h (XTREG_END): Add cast to unsigned.
(XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
---
gdb/ChangeLog | 5 +++++
gdb/xtensa-tdep.h | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h
index ccd3714640..d170e054d4 100644
--- a/gdb/xtensa-tdep.h
+++ b/gdb/xtensa-tdep.h
@@ -130,7 +130,7 @@ typedef struct
ct, bsz, sz, al, tnum, flg, cp, mas, fet, sto},
#define XTREG_END \
{0, 0, (xtensa_register_type_t) 0, (xtensa_register_group_t) 0, \
- 0, 0, 0, 0, -1, 0, 0, 0, 0, 0},
+ 0, 0, 0, 0, (unsigned) -1, 0, 0, 0, 0, 0},
#define XTENSA_REGISTER_FLAGS_PRIVILEGED 0x0001
#define XTENSA_REGISTER_FLAGS_READABLE 0x0002
@@ -228,7 +228,7 @@ struct gdbarch_tdep
#define XTENSA_GDBARCH_TDEP_INSTANTIATE(rmap,spillsz) \
{ \
0, /* target_flags */ \
- -1, /* spill_location */ \
+ (unsigned) -1, /* spill_location */ \
(spillsz), /* spill_size */ \
0, /* unused */ \
(XSHAL_ABI == XTHAL_ABI_CALL0 \
--
2.13.6
next prev parent reply other threads:[~2018-08-08 23:20 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 5/7] Avoid -Wnarrowing warnings in ppc64-tdep.c Tom Tromey
2018-08-08 23:20 ` [PATCH 6/7] Avoid -Wnarrowing warnings in gdbserver Tom Tromey
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 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
2018-08-08 23:20 ` Tom Tromey [this message]
2018-08-09 18:09 ` [PATCH 4/7] Fix two -Wnarrowing warnings in xtensa-tdep.h Pedro Alves
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
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=20180808232016.12777-5-tom@tromey.com \
--to=tom@tromey.com \
--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