From patchwork Thu Jul 4 17:03:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 33591 Received: (qmail 113930 invoked by alias); 4 Jul 2019 17:04:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 108354 invoked by uid 89); 4 Jul 2019 17:03:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: gateway32.websitewelcome.com Received: from gateway32.websitewelcome.com (HELO gateway32.websitewelcome.com) (192.185.145.123) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Jul 2019 17:03:39 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway32.websitewelcome.com (Postfix) with ESMTP id 0D9FA1A3F4 for ; Thu, 4 Jul 2019 12:03:38 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id j590hUtA2YTGMj590hNgBc; Thu, 04 Jul 2019 12:03:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zxVPGVKpm/Yd4YxMh0kc73H0YaorvSKSmdYpNG6nj+4=; b=Kr4VdsZh9wH2ou/2hOZTcuggW8 yR7togW11Sycf/DreCNyKLNaMKzh6lWYVl5Ygrtk3181/7D9xV9N/b1SFv74cZeK2y8dPhm9Hv/cj jv9vhqVaeK29kbmU5gsPjjCt/; Received: from 174-29-58-150.hlrn.qwest.net ([174.29.58.150]:34706 helo=bapiya.Home) by box5379.bluehost.com with esmtpa (Exim 4.92) (envelope-from ) id 1hj58z-002sQh-Q2; Thu, 04 Jul 2019 12:03:37 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 61/61] Remove unnecessary "return"s Date: Thu, 4 Jul 2019 11:03:11 -0600 Message-Id: <20190704170311.15982-62-tom@tromey.com> In-Reply-To: <20190704170311.15982-1-tom@tromey.com> References: <20190704170311.15982-1-tom@tromey.com> The TUI has some "return;" statements at the end of void-returning functions. There's no need for these, so this patch removes them. 2019-07-04 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 | 5 +---- gdb/tui/tui-wingeneral.c | 1 - gdb/tui/tui-winsource.c | 7 ------- gdb/tui/tui.c | 2 -- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index effe8e74528..17587809bcb 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; } @@ -293,12 +291,11 @@ tui_show_disassem_and_update_source (struct gdbarch *gdbarch, { set_current_source_symtab_and_line (sal); tui_update_locator_fullname (symtab_to_fullname (sal.symtab)); + } 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