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] Replace (void *) cast with (gdb_byte *)


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

commit 55e5bf59f09012c978aa952670be654b6c5598e8
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Sat Oct 24 18:36:26 2015 -0400

    Replace (void *) cast with (gdb_byte *)
    
    Fixes:
    
    /home/simark/src/binutils-gdb/gdb/nat/linux-ptrace.c:207:6: error: invalid conversion from â??void*â?? to â??gdb_byte* {aka unsigned char*}â?? [-fpermissive]
       pc = (void *) (uintptr_t) l;
             ^
    
    gdb/ChangeLog:
    
    	* nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Replace
    	(void *) cast with (gdb_byte *).

Diff:
---
 gdb/ChangeLog          | 5 +++++
 gdb/nat/linux-ptrace.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fae9d4d..d658649 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
 
+	* nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Replace
+	(void *) cast with (gdb_byte *).
+
+2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
+
 	* proc-service.c (ps_pdread): Add cast.
 
 2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
index 97331a4..60c7960 100644
--- a/gdb/nat/linux-ptrace.c
+++ b/gdb/nat/linux-ptrace.c
@@ -204,7 +204,7 @@ linux_ptrace_test_ret_to_nx (void)
 	       safe_strerror (errno));
       return;
     }
-  pc = (void *) (uintptr_t) l;
+  pc = (gdb_byte *) (uintptr_t) l;
 
   kill (child, SIGKILL);
   ptrace (PTRACE_KILL, child, (PTRACE_TYPE_ARG3) NULL,


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