public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Remove unnecessary "return"s Date: Wed, 17 Jul 2019 18:41:00 -0000 [thread overview] Message-ID: <20190717184140.93924.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d8f68fcb9378b5ab1c945fa676e11da15be56dd6 commit d8f68fcb9378b5ab1c945fa676e11da15be56dd6 Author: Tom Tromey <tom@tromey.com> Date: Thu Jul 4 10:09:36 2019 -0600 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 <tom@tromey.com> * 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. Diff: --- 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 aff8c75..175aa92 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2019-07-17 Tom Tromey <tom@tromey.com> + * 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 <tom@tromey.com> + * tui/tui-win.c (parse_scrolling_args): Throw separate errors. 2019-07-17 Tom Tromey <tom@tromey.com> diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index effe8e7..80f8d47 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 a2e4886..dc55631 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 71147da..3de2692 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 b15eb32..e0eb12f 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
reply other threads:[~2019-07-17 18:41 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190717184140.93924.qmail@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).