This is the mail archive of the gdb-patches@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]

[PATCH obv/c++] tui-data.c: Remove unnecessary casts


FYI, I just pushed this as obvious.

The (void *) casts make the build fail in C++ mode and are unnecessary.

gdb/ChangeLog:

	* tui/tui-data.c (tui_add_to_source_windows): Remove void *
	cast.
	(tui_add_content_elements): Likewise.
---
 gdb/ChangeLog      | 6 ++++++
 gdb/tui/tui-data.c | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3017fd0..56499c9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
 
+	* tui/tui-data.c (tui_add_to_source_windows): Remove void *
+	cast.
+	(tui_add_content_elements): Likewise.
+
+2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
+
 	* cli/cli-setshow.c (do_set_command): Constify p.
 
 2015-10-24  Simon Marchi  <simon.marchi@polymtl.ca>
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index 2fcd547..4966c5b 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -192,7 +192,7 @@ void
 tui_add_to_source_windows (struct tui_win_info *win_info)
 {
   if (source_windows.count < 2)
-    source_windows.list[source_windows.count++] = (void *) win_info;
+    source_windows.list[source_windows.count++] = win_info;
 }
 
 
@@ -636,7 +636,7 @@ tui_add_content_elements (struct tui_gen_win_info *win_info,
 	  element_ptr = XNEW (struct tui_win_element);
 	  if (element_ptr != NULL)
 	    {
-	      win_info->content[i] = (void *) element_ptr;
+	      win_info->content[i] = element_ptr;
 	      init_content_element (element_ptr, win_info->type);
 	      win_info->content_size++;
 	    }
-- 
2.6.1


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