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-ppc-low.c: Add casts


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

commit 2bc84e8a6d94d9d7ead1bc4febf0fb331394406e
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Tue Nov 3 13:33:11 2015 -0500

    linux-ppc-low.c: Add casts
    
    Trivial casts for C++.
    
    gdb/gdbserver/ChangeLog:
    
    	* linux-ppc-low.c (ppc_get_hwcap): Add cast.
    	(ppc_fill_vsxregset): Likewise.
    	(ppc_store_vsxregset): Likewise.
    	(ppc_fill_vrregset): Likewise.
    	(ppc_store_vrregset): Likewise.
    	(ppc_fill_evrregset): Likewise.
    	(ppc_store_evrregset): Likewise.

Diff:
---
 gdb/gdbserver/ChangeLog       | 10 ++++++++++
 gdb/gdbserver/linux-ppc-low.c | 14 +++++++-------
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 01ad56e..838589d 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,15 @@
 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
 
+	* linux-ppc-low.c (ppc_get_hwcap): Add cast.
+	(ppc_fill_vsxregset): Likewise.
+	(ppc_store_vsxregset): Likewise.
+	(ppc_fill_vrregset): Likewise.
+	(ppc_store_vrregset): Likewise.
+	(ppc_fill_evrregset): Likewise.
+	(ppc_store_evrregset): Likewise.
+
+2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
+
 	* linux-ppc-low.c (ppc_usrregs_info): Remove
 	forward-declaration.
 	(ppc_arch_setup): Move lower in file.
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
index 3840e40..995a725 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
@@ -346,7 +346,7 @@ ppc_get_hwcap (unsigned long *valp)
 {
   const struct target_desc *tdesc = current_process ()->tdesc;
   int wordsize = register_size (tdesc, 0);
-  unsigned char *data = alloca (2 * wordsize);
+  unsigned char *data = (unsigned char *) alloca (2 * wordsize);
   int offset = 0;
 
   while ((*the_target->read_auxv) (offset, data, 2 * wordsize) == 2 * wordsize)
@@ -446,7 +446,7 @@ static void
 ppc_fill_vsxregset (struct regcache *regcache, void *buf)
 {
   int i, base;
-  char *regset = buf;
+  char *regset = (char *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_VSX))
     return;
@@ -460,7 +460,7 @@ static void
 ppc_store_vsxregset (struct regcache *regcache, const void *buf)
 {
   int i, base;
-  const char *regset = buf;
+  const char *regset = (const char *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_VSX))
     return;
@@ -476,7 +476,7 @@ static void
 ppc_fill_vrregset (struct regcache *regcache, void *buf)
 {
   int i, base;
-  char *regset = buf;
+  char *regset = (char *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC))
     return;
@@ -493,7 +493,7 @@ static void
 ppc_store_vrregset (struct regcache *regcache, const void *buf)
 {
   int i, base;
-  const char *regset = buf;
+  const char *regset = (const char *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC))
     return;
@@ -517,7 +517,7 @@ static void
 ppc_fill_evrregset (struct regcache *regcache, void *buf)
 {
   int i, ev0;
-  struct gdb_evrregset_t *regset = buf;
+  struct gdb_evrregset_t *regset = (struct gdb_evrregset_t *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_SPE))
     return;
@@ -534,7 +534,7 @@ static void
 ppc_store_evrregset (struct regcache *regcache, const void *buf)
 {
   int i, ev0;
-  const struct gdb_evrregset_t *regset = buf;
+  const struct gdb_evrregset_t *regset = (const struct gdb_evrregset_t *) buf;
 
   if (!(ppc_hwcap & PPC_FEATURE_HAS_SPE))
     return;


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