diff options
author | Tom Tromey <tom@tromey.com> | 2018-10-14 12:50:32 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-10-15 23:01:32 -0600 |
commit | 63a33118e05a84fbae40cbe3ef955b52bad359a7 (patch) | |
tree | 96b04124eea7f31c097333b538b2f8974aaff97d /gdb/tui/tui-winsource.c | |
parent | d53eec4ef86cf85841ceaec7db99753827f2beee (diff) | |
download | gdb-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-winsource.c')
-rw-r--r-- | gdb/tui/tui-winsource.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 6c5fe5d..49eb4ce 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -279,7 +279,7 @@ tui_show_source_line (struct tui_win_info *win_info, int lineno) wattron (win_info->generic.handle, A_STANDOUT); mvwaddstr (win_info->generic.handle, lineno, 1, - (char *) line->which_element.source.line); + line->which_element.source.line); if (line->which_element.source.is_exec_point) wattroff (win_info->generic.handle, A_STANDOUT); @@ -364,7 +364,7 @@ tui_set_is_exec_point_at (struct tui_line_or_address l, { int changed = 0; int i; - tui_win_content content = (tui_win_content) win_info->generic.content; + tui_win_content content = win_info->generic.content; i = 0; while (i < win_info->generic.content_size) @@ -651,7 +651,7 @@ tui_line_is_displayed (int line, = win_info->generic.content[i] ->which_element.source.line_or_addr.loa == LOA_LINE && win_info->generic.content[i] - ->which_element.source.line_or_addr.u.line_no == (int) line; + ->which_element.source.line_or_addr.u.line_no == line; i++; } |