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] linux-mips-low.c: Add casts


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

commit 1996e237bb2fd3ac6c487b6e0821fdce6e03d122
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Tue Nov 3 13:33:15 2015 -0500

    linux-mips-low.c: Add casts
    
    Fixes a bunch of:
    
    /home/simark/src/binutils-gdb/gdb/gdbserver/linux-mips-low.c: In function â??void mips_store_fpregset(regcache*, const void*)â??:
    /home/simark/src/binutils-gdb/gdb/gdbserver/linux-mips-low.c:809:39: error: invalid conversion from â??const void*â?? to â??const mips_register*â?? [-fpermissive]
       const union mips_register *regset = buf;
                                           ^
    
    gdb/gdbserver/ChangeLog:
    
    	* linux-mips-low.c (mips_fill_gregset): Add cast.
    	(mips_store_gregset): Likewise.
    	(mips_fill_fpregset): Likewise.
    	(mips_store_fpregset): Likewise.

Diff:
---
 gdb/gdbserver/ChangeLog        | 7 +++++++
 gdb/gdbserver/linux-mips-low.c | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index e55b2a2..2471dc1 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,12 @@
 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
 
+	* linux-mips-low.c (mips_fill_gregset): Add cast.
+	(mips_store_gregset): Likewise.
+	(mips_fill_fpregset): Likewise.
+	(mips_store_fpregset): Likewise.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
 	* linux-mips-low.c (mips_add_watchpoint): Rename private to
 	priv.
 
diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c
index 0525522..459f4fc 100644
--- a/gdb/gdbserver/linux-mips-low.c
+++ b/gdb/gdbserver/linux-mips-low.c
@@ -724,7 +724,7 @@ mips_supply_register_32bit (struct regcache *regcache,
 static void
 mips_fill_gregset (struct regcache *regcache, void *buf)
 {
-  union mips_register *regset = buf;
+  union mips_register *regset = (union mips_register *) buf;
   int i, use_64bit;
   const struct target_desc *tdesc = regcache->tdesc;
 
@@ -753,7 +753,7 @@ mips_fill_gregset (struct regcache *regcache, void *buf)
 static void
 mips_store_gregset (struct regcache *regcache, const void *buf)
 {
-  const union mips_register *regset = buf;
+  const union mips_register *regset = (const union mips_register *) buf;
   int i, use_64bit;
 
   use_64bit = (register_size (regcache->tdesc, 0) == 8);
@@ -781,7 +781,7 @@ mips_store_gregset (struct regcache *regcache, const void *buf)
 static void
 mips_fill_fpregset (struct regcache *regcache, void *buf)
 {
-  union mips_register *regset = buf;
+  union mips_register *regset = (union mips_register *) buf;
   int i, use_64bit, first_fp, big_endian;
 
   use_64bit = (register_size (regcache->tdesc, 0) == 8);
@@ -806,7 +806,7 @@ mips_fill_fpregset (struct regcache *regcache, void *buf)
 static void
 mips_store_fpregset (struct regcache *regcache, const void *buf)
 {
-  const union mips_register *regset = buf;
+  const union mips_register *regset = (const union mips_register *) buf;
   int i, use_64bit, first_fp, big_endian;
 
   use_64bit = (register_size (regcache->tdesc, 0) == 8);


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