This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix "incompatible pointer type" warning in gdb/aarch64-tdep.c


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d9436c7c71f13df84182371c6b2fb6e356051d14

commit d9436c7c71f13df84182371c6b2fb6e356051d14
Author: Pedro Alves <palves@redhat.com>
Date:   Wed Apr 20 20:15:21 2016 +0100

    Fix "incompatible pointer type" warning in gdb/aarch64-tdep.c
    
    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), &reg_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  <palves@redhat.com>
    
    	* aarch64-tdep.c (aarch64_record_load_store): Change type of
    	'reg_rm_val' local to ULONGEST.

Diff:
---
 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  <palves@redhat.com>
 
+	* aarch64-tdep.c (aarch64_record_load_store): Change type of
+	'reg_rm_val' local to ULONGEST.
+
+2016-04-20  Pedro Alves  <palves@redhat.com>
+
 	* darwin-nat.c (darwin_resume_thread): Add uintptr_t cast.
 
 2016-04-20  Doug Evans  <xdje42@gmail.com>
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), &reg_rm_val);
           if (bit (aarch64_insn_r->aarch64_insn, 12))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]