From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27087 invoked by alias); 11 Apr 2013 22:59:58 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 27078 invoked by uid 89); 11 Apr 2013 22:59:58 -0000 X-Spam-SWARE-Status: No, score=-8.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 11 Apr 2013 22:59:57 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3BMxuwY020556 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Apr 2013 18:59:56 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3BMxsKq030910 for ; Thu, 11 Apr 2013 18:59:55 -0400 Subject: [PATCH 08/26] -Wpointer-sign: s390-tdep.c. To: gdb-patches@sourceware.org From: Pedro Alves Date: Thu, 11 Apr 2013 23:01:00 -0000 Message-ID: <20130411225954.16791.39934.stgit@brno.lan> In-Reply-To: <20130411225847.16791.29283.stgit@brno.lan> References: <20130411225847.16791.29283.stgit@brno.lan> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-SW-Source: 2013-04/txt/msg00348.txt.bz2 -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-11 Pedro Alves * s390-tdep.c (is_rs, is_rsy, is_rx, is_rxy): Change type of 'd2' parameter to int *. --- gdb/s390-tdep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)