From d8f68fcb9378b5ab1c945fa676e11da15be56dd6 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 4 Jul 2019 10:09:36 -0600 Subject: [PATCH] Remove unnecessary "return"s The TUI has some "return;" statements at the end of void-returning functions. There's no need for these, so this patch removes them. gdb/ChangeLog 2019-07-17 Tom Tromey * tui/tui-winsource.c (tui_update_source_window) (tui_update_source_window_as_is) (tui_update_source_windows_with_line): Remove return. * tui/tui-disasm.c (tui_show_disassem) (tui_show_disassem_and_update_source): Remove return. * tui/tui.c (tui_reset): Remove return. * tui/tui-wingeneral.c (tui_check_and_display_highlight_if_needed): Remove return. --- gdb/ChangeLog | 11 +++++++++++ gdb/tui/tui-disasm.c | 4 ---- gdb/tui/tui-wingeneral.c | 1 - gdb/tui/tui-winsource.c | 7 ------- gdb/tui/tui.c | 2 -- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index aff8c75a0a9..175aa92a57f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +2019-07-17 Tom Tromey + + * tui/tui-winsource.c (tui_update_source_window) + (tui_update_source_window_as_is) + (tui_update_source_windows_with_line): Remove return. + * tui/tui-disasm.c (tui_show_disassem) + (tui_show_disassem_and_update_source): Remove return. + * tui/tui.c (tui_reset): Remove return. + * tui/tui-wingeneral.c + (tui_check_and_display_highlight_if_needed): Remove return. + 2019-07-17 Tom Tromey * tui/tui-win.c (parse_scrolling_args): Throw separate errors. diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index effe8e74528..80f8d47f0ac 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -265,8 +265,6 @@ tui_show_disassem (struct gdbarch *gdbarch, CORE_ADDR start_addr) if (tui_current_layout () != SRC_DISASSEM_COMMAND && win_with_focus == TUI_SRC_WIN) tui_set_win_focus_to (TUI_DISASM_WIN); - - return; } @@ -297,8 +295,6 @@ tui_show_disassem_and_update_source (struct gdbarch *gdbarch, else tui_update_locator_fullname ("?"); } - - return; } void diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index a2e48865761..dc556317297 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -122,7 +122,6 @@ tui_check_and_display_highlight_if_needed (struct tui_win_info *win_info) tui_unhighlight_win (win_info); } - return; } diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 71147da2f91..3de2692deea 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -77,8 +77,6 @@ tui_update_source_window (struct tui_source_window_base *win_info, { win_info->horizontal_offset = 0; tui_update_source_window_as_is (win_info, gdbarch, s, line_or_addr, noerror); - - return; } @@ -125,9 +123,6 @@ tui_update_source_window_as_is (struct tui_source_window_base *win_info, tui_set_win_focus_to (win_info); } } - - - return; } @@ -200,8 +195,6 @@ tui_update_source_windows_with_line (struct symtab *s, int line) } break; } - - return; } void diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index b15eb32af5e..e0eb12fb833 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -630,8 +630,6 @@ tui_reset (void) #endif /* CBREAK */ | VTDELAY | ALLDELAY); mode.sg_flags |= XTABS | ECHO | CRMOD | ANYP; - - return; } #endif -- 2.30.2