aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-windata.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-10-14 12:50:32 -0600
committerTom Tromey <tom@tromey.com>2018-10-15 23:01:32 -0600
commit63a33118e05a84fbae40cbe3ef955b52bad359a7 (patch)
tree96b04124eea7f31c097333b538b2f8974aaff97d /gdb/tui/tui-windata.c
parentd53eec4ef86cf85841ceaec7db99753827f2beee (diff)
downloadgdb-63a33118e05a84fbae40cbe3ef955b52bad359a7.zip
gdb-63a33118e05a84fbae40cbe3ef955b52bad359a7.tar.gz
gdb-63a33118e05a84fbae40cbe3ef955b52bad359a7.tar.bz2
Remove unnecessary casts from TUI
This removes a number of unnecessary casts from the TUI. Some were found with -Wuseless-cast (which, I think, can't easily be enabled for gdb); and some were found by inspection. Tested by rebuilding on x86-64 Fedora 28. I'm checking this in. gdb/ChangeLog 2018-10-15 Tom Tromey <tom@tromey.com> * tui/tui.c (strcat_to_buf): Remove casts. * tui/tui-winsource.c (tui_show_source_line) (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts. * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts. * tui/tui-windata.c (tui_first_data_item_displayed) (tui_delete_data_content_windows, tui_erase_data_content) (tui_display_all_data, tui_display_data_from) (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts. * tui/tui-win.c (tui_set_win_height) (make_invisible_and_set_new_height, parse_scrolling_args): Remove casts. * tui/tui-win.c (tui_resize_all): Remove casts. (tui_scroll_backward_command, tui_set_focus) (tui_set_tab_width_command): Likewise. * tui/tui-source.c (tui_vertical_source_scroll): Remove cast. * tui/tui-regs.c (tui_show_register_group): Remove cast. * tui/tui-layout.c (tui_set_layout_by_name): Remove cast. * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast. * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content): Remove casts.
Diffstat (limited to 'gdb/tui/tui-windata.c')
-rw-r--r--gdb/tui/tui-windata.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/tui/tui-windata.c b/gdb/tui/tui-windata.c
index a7d6dff..5688cff 100644
--- a/gdb/tui/tui-windata.c
+++ b/gdb/tui/tui-windata.c
@@ -53,8 +53,8 @@ tui_first_data_item_displayed (void)
{
struct tui_gen_win_info *data_item_win;
- data_item_win = &((tui_win_content)
- TUI_DATA_WIN->generic.content)[i]->which_element.data_window;
+ data_item_win
+ = &TUI_DATA_WIN->generic.content[i]->which_element.data_window;
if (data_item_win->handle != (WINDOW *) NULL
&& data_item_win->is_visible)
element_no = i;
@@ -91,8 +91,8 @@ tui_delete_data_content_windows (void)
for (i = 0; (i < TUI_DATA_WIN->generic.content_size); i++)
{
- data_item_win_ptr = &((tui_win_content)
- TUI_DATA_WIN->generic.content)[i]->which_element.data_window;
+ data_item_win_ptr
+ = &TUI_DATA_WIN->generic.content[i]->which_element.data_window;
tui_delete_win (data_item_win_ptr->handle);
data_item_win_ptr->handle = NULL;
data_item_win_ptr->is_visible = FALSE;
@@ -105,7 +105,7 @@ tui_erase_data_content (const char *prompt)
{
werase (TUI_DATA_WIN->generic.handle);
tui_check_and_display_highlight_if_needed (TUI_DATA_WIN);
- if (prompt != (char *) NULL)
+ if (prompt != NULL)
{
int half_width = (TUI_DATA_WIN->generic.width - 2) / 2;
int x_pos;
@@ -132,7 +132,7 @@ tui_display_all_data (void)
tui_erase_data_content (NO_DATA_STRING);
else
{
- tui_erase_data_content ((char *) NULL);
+ tui_erase_data_content (NULL);
tui_delete_data_content_windows ();
tui_check_and_display_highlight_if_needed (TUI_DATA_WIN);
tui_display_registers_from (0);
@@ -201,7 +201,7 @@ tui_display_data_from (int element_no, int reuse_windows)
if (first_line >= 0)
{
- tui_erase_data_content ((char *) NULL);
+ tui_erase_data_content (NULL);
if (!reuse_windows)
tui_delete_data_content_windows ();
tui_display_data_from_line (first_line);
@@ -213,7 +213,7 @@ tui_display_data_from (int element_no, int reuse_windows)
void
tui_refresh_data_win (void)
{
- tui_erase_data_content ((char *) NULL);
+ tui_erase_data_content (NULL);
if (TUI_DATA_WIN->generic.content_size > 0)
{
int first_element = tui_first_data_item_displayed ();
@@ -284,7 +284,7 @@ tui_vertical_data_scroll (enum tui_scroll_direction scroll_direction,
first_line += num_to_scroll;
else
first_line -= num_to_scroll;
- tui_erase_data_content ((char *) NULL);
+ tui_erase_data_content (NULL);
tui_delete_data_content_windows ();
tui_display_data_from_line (first_line);
}