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] stap-probe: Remove unnecessary cast


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

commit bc1f8cdaf4b26d1c7af34c7a33038c50fd5eabd4
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Tue Sep 22 11:17:52 2015 -0400

    stap-probe: Remove unnecessary cast
    
    ret->args_u.text is const char *, probe_args is const char *, so no cast
    is needed.  Found while doing cxx-conversion stuff, since it wouldn't
    build in C++.
    
    gdb/ChangeLog:
    
    	* stap-probe.c (handle_stap_probe): Remove unnecessary cast.

Diff:
---
 gdb/ChangeLog    | 4 ++++
 gdb/stap-probe.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 188bfb2..42ffaf7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* stap-probe.c (handle_stap_probe): Remove unnecessary cast.
+
 2015-09-21  Simon Marchi  <simon.marchi@ericsson.com>
 
 	* cli/cli-setshow.c (cmd_show_list): Constify a variable.
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 912505c..8f8cea6 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -1538,7 +1538,7 @@ handle_stap_probe (struct objfile *objfile, struct sdt_note *el,
     }
 
   ret->args_parsed = 0;
-  ret->args_u.text = (void *) probe_args;
+  ret->args_u.text = probe_args;
 
   /* Successfully created probe.  */
   VEC_safe_push (probe_p, *probesp, (struct probe *) ret);


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