From patchwork Mon Oct 9 02:42:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 23400 Received: (qmail 6637 invoked by alias); 9 Oct 2017 02:43:13 -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 6610 invoked by uid 89); 9 Oct 2017 02:43:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1155 X-HELO: gproxy8-pub.mail.unifiedlayer.com Received: from gproxy8-pub.mail.unifiedlayer.com (HELO gproxy8-pub.mail.unifiedlayer.com) (67.222.33.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Oct 2017 02:43:11 +0000 Received: from cmgw4 (unknown [10.0.90.85]) by gproxy8.mail.unifiedlayer.com (Postfix) with ESMTP id 5A8FF1AB057 for ; Sun, 8 Oct 2017 20:43:10 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id KEj71w00C2f2jeq01EjA93; Sun, 08 Oct 2017 20:43:10 -0600 X-Authority-Analysis: v=2.2 cv=OZLoNlbY c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=02M-m0pO-4AA:10 a=zstS-IiYAAAA:8 a=OeF36p0urxMAy0iNs8oA:9 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 75-166-4-236.hlrn.qwest.net ([75.166.4.236]:43016 helo=bapiya.localdomain) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1e1O27-000vsd-5T; Sun, 08 Oct 2017 20:43:07 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 1/2] Remove "do_nothing" Date: Sun, 8 Oct 2017 20:42:59 -0600 Message-Id: <20171009024300.8346-2-tom@tromey.com> In-Reply-To: <20171009024300.8346-1-tom@tromey.com> References: <20171009024300.8346-1-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1e1O27-000vsd-5T X-Source-Sender: 75-166-4-236.hlrn.qwest.net (bapiya.localdomain) [75.166.4.236]:43016 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes The do_nothing function in mi-main.c is used as a splay tree key-deleting function; but NULL serves the same purpose and is used elsewhere in gdb. This patch removes the unneeded function. gdb/ChangeLog 2017-10-08 Tom Tromey * mi/mi-main.c (do_nothing): Remove. (list_available_thread_groups): Update. --- gdb/ChangeLog | 5 +++++ gdb/mi/mi-main.c | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 289445f832..98fff4f1b5 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -702,11 +702,6 @@ output_cores (struct ui_out *uiout, const char *field_name, const char *xcores) } static void -do_nothing (splay_tree_key k) -{ -} - -static void free_vector_of_osdata_items (splay_tree_value xvalue) { VEC (osdata_item_s) *value = (VEC (osdata_item_s) *) xvalue; @@ -756,7 +751,7 @@ list_available_thread_groups (const std::set &ids, int recurse) make_cleanup_osdata_free (threads); tree = splay_tree_new (splay_tree_int_comparator, - do_nothing, + NULL, free_vector_of_osdata_items); make_cleanup (free_splay_tree, tree);