aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-04-19 15:22:47 +0000
committerPedro Alves <palves@redhat.com>2013-04-19 15:22:47 +0000
commiteb1bd1fb4bc3d38a6474458828bd61ef4aa006b2 (patch)
treea102e590a36c6333fc3e23e775e9be7f00895646
parent463920bf28e3aea7ebac2cf10b8e5b98e56400eb (diff)
downloadgdb-eb1bd1fb4bc3d38a6474458828bd61ef4aa006b2.zip
gdb-eb1bd1fb4bc3d38a6474458828bd61ef4aa006b2.tar.gz
gdb-eb1bd1fb4bc3d38a6474458828bd61ef4aa006b2.tar.bz2
-Wpointer-sign: s390-tdep.c.
-Wpointer-sign reveals a bunch of: ../../src/gdb/s390-tdep.c:1342:7: error: pointer targets in passing argument 4 of ‘is_rx’ differ in signedness [-Werror=pointer-sign] ../../src/gdb/s390-tdep.c:1038:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ ../../src/gdb/s390-tdep.c:1343:9: error: pointer targets in passing argument 5 of ‘is_rxy’ differ in signedness [-Werror=pointer-sign] ../../src/gdb/s390-tdep.c:1055:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ ../../src/gdb/s390-tdep.c:1344:9: error: pointer targets in passing argument 5 of ‘is_rxy’ differ in signedness [-Werror=pointer-sign] ../../src/gdb/s390-tdep.c:1055:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ ... ../../src/gdb/s390-tdep.c:1363:7: error: pointer targets in passing argument 5 of ‘is_rs’ differ in signedness [-Werror=pointer-sign] ../../src/gdb/s390-tdep.c:966:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ ../../src/gdb/s390-tdep.c:1364:9: error: pointer targets in passing argument 6 of ‘is_rsy’ differ in signedness [-Werror=pointer-sign] ../../src/gdb/s390-tdep.c:983:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ ../../src/gdb/s390-tdep.c:1365:9: error: pointer targets in passing argument 6 of ‘is_rsy’ differ in signedness [-Werror=pointer-sign] ../../src/gdb/s390-tdep.c:983:1: note: expected ‘unsigned int *’ but argument is of type ‘int *’ ... I don't know much about s390, but from reading the code I believe the right fix is to treat d2 as signed. gdb/ 2013-04-19 Pedro Alves <palves@redhat.com> * s390-tdep.c (is_rs, is_rsy, is_rx, is_rxy): Change type of 'd2' parameter to int *.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/s390-tdep.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f71ebc6..4ce4ffa 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2013-04-19 Pedro Alves <palves@redhat.com>
+ * s390-tdep.c (is_rs, is_rsy, is_rx, is_rxy): Change type of 'd2'
+ parameter to int *.
+
+2013-04-19 Pedro Alves <palves@redhat.com>
+
* ppc-linux-tdep.c (ppc_skip_trampoline_code): Change local
'insnbuf' buffer type to unsigned int[].
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 50f8877..641bc80 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -964,7 +964,7 @@ is_rre (bfd_byte *insn, int op, unsigned int *r1, unsigned int *r2)
static int
is_rs (bfd_byte *insn, int op,
- unsigned int *r1, unsigned int *r3, unsigned int *d2, unsigned int *b2)
+ unsigned int *r1, unsigned int *r3, int *d2, unsigned int *b2)
{
if (insn[0] == op)
{
@@ -981,7 +981,7 @@ is_rs (bfd_byte *insn, int op,
static int
is_rsy (bfd_byte *insn, int op1, int op2,
- unsigned int *r1, unsigned int *r3, unsigned int *d2, unsigned int *b2)
+ unsigned int *r1, unsigned int *r3, int *d2, unsigned int *b2)
{
if (insn[0] == op1
&& insn[5] == op2)
@@ -1036,7 +1036,7 @@ is_rie (bfd_byte *insn, int op1, int op2,
static int
is_rx (bfd_byte *insn, int op,
- unsigned int *r1, unsigned int *d2, unsigned int *x2, unsigned int *b2)
+ unsigned int *r1, int *d2, unsigned int *x2, unsigned int *b2)
{
if (insn[0] == op)
{
@@ -1053,7 +1053,7 @@ is_rx (bfd_byte *insn, int op,
static int
is_rxy (bfd_byte *insn, int op1, int op2,
- unsigned int *r1, unsigned int *d2, unsigned int *x2, unsigned int *b2)
+ unsigned int *r1, int *d2, unsigned int *x2, unsigned int *b2)
{
if (insn[0] == op1
&& insn[5] == op2)