]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix two -Wnarrowing warnings in xtensa-tdep.h
authorTom Tromey <tom@tromey.com>
Tue, 7 Aug 2018 19:07:21 +0000 (13:07 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 27 Aug 2018 18:00:10 +0000 (12:00 -0600)
This fixes a couple of -Wnarrowing warnings in xtensa-tdep.h, by
introducing some casts to unsigned.

gdb/ChangeLog
2018-08-27  Tom Tromey  <tom@tromey.com>

* xtensa-tdep.h (XTREG_END): Add cast to unsigned.
(XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.

gdb/ChangeLog
gdb/xtensa-tdep.h

index 8d3bf0ec77f9d784de213bad363974b39c7df1ce..0b93707cf5b7dc56da73b8503a71c25e1c526488 100644 (file)
@@ -1,3 +1,8 @@
+2018-08-27  Tom Tromey  <tom@tromey.com>
+
+       * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
+       (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
+
 2018-08-27  Tom Tromey  <tom@tromey.com>
 
        * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
index ccd3714640d4862cb59867fe680227d301d6589e..d170e054d44f9178ef1ce9fc93a4c5fcafa6f81c 100644 (file)
@@ -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                                      \