From patchwork Wed Apr 20 22:01:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 11829 Received: (qmail 41801 invoked by alias); 20 Apr 2016 22:01:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 41791 invoked by uid 89); 20 Apr 2016 22:01:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1919 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 22:01:43 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5710F85365 for ; Wed, 20 Apr 2016 22:01:42 +0000 (UTC) Received: from cascais.lan (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3KM1f1H005204 for ; Wed, 20 Apr 2016 18:01:41 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [ob/pushed] Fix "incompatible pointer type" warning in gdb/aarch64-tdep.c Date: Wed, 20 Apr 2016 23:01:41 +0100 Message-Id: <1461189701-9684-1-git-send-email-palves@redhat.com> Fixes, with x86_64-apple-darwin15-gcc (gcc 5.3.0): .../src/gdb/aarch64-tdep.c: In function 'aarch64_record_load_store': .../src/gdb/aarch64-tdep.c:3479:67: error: passing argument 3 of 'regcache_raw_read_unsigned' from incompatible pointer type [-Werror=incompatible-pointer-types] bits (aarch64_insn_r->aarch64_insn, 16, 20), ®_rm_val); ^ In file included from .../src/gdb/regcache.h:23:0, from .../src/gdb/gdbarch.h:69, from .../src/gdb/defs.h:620, from .../src/gdb/aarch64-tdep.c:21: .../src/gdb/common/common-regcache.h:60:29: note: expected 'ULONGEST * {aka long unsigned int *}' but argument is of type 'uint64_t * {aka long long unsigned int *}' extern enum register_status regcache_raw_read_unsigned ^ gdb/ChangeLog: 2016-04-20 Pedro Alves * aarch64-tdep.c (aarch64_record_load_store): Change type of 'reg_rm_val' local to ULONGEST. --- gdb/ChangeLog | 5 +++++ gdb/aarch64-tdep.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0f13721..16edea2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2016-04-20 Pedro Alves + * aarch64-tdep.c (aarch64_record_load_store): Change type of + 'reg_rm_val' local to ULONGEST. + +2016-04-20 Pedro Alves + * darwin-nat.c (darwin_resume_thread): Add uintptr_t cast. 2016-04-20 Doug Evans diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 77155ef..6f2e38e 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -3474,7 +3474,8 @@ aarch64_record_load_store (insn_decode_record *aarch64_insn_r) if (!ld_flag) { - uint64_t reg_rm_val; + ULONGEST reg_rm_val; + regcache_raw_read_unsigned (aarch64_insn_r->regcache, bits (aarch64_insn_r->aarch64_insn, 16, 20), ®_rm_val); if (bit (aarch64_insn_r->aarch64_insn, 12))