From patchwork Thu Feb 9 21:24:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 19201 Received: (qmail 118271 invoked by alias); 9 Feb 2017 21:25:21 -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 118099 invoked by uid 89); 9 Feb 2017 21:25:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=type_name, *block, TYPE_NAME, Hx-spam-relays-external:sk:gproxy8 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 SMTP; Thu, 09 Feb 2017 21:25:08 +0000 Received: (qmail 26859 invoked by uid 0); 9 Feb 2017 21:25:07 -0000 Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy8.mail.unifiedlayer.com with SMTP; 9 Feb 2017 21:25:07 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw2 with id ilR41u0062f2jeq01lR75t; Thu, 09 Feb 2017 14:25:07 -0700 X-Authority-Analysis: v=2.1 cv=H5NInYoi c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=n2v9WMKugxEA:10 a=zstS-IiYAAAA:8 a=DHAFqaxFOue9gIIOLa4A:9 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 174-16-146-181.hlrn.qwest.net ([174.16.146.181]:47456 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1cbwD9-0005WN-SP; Thu, 09 Feb 2017 14:25:03 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA v2 6/7] Remove unnecessary local variables Date: Thu, 9 Feb 2017 14:24:55 -0700 Message-Id: <20170209212456.2385-7-tom@tromey.com> In-Reply-To: <20170209212456.2385-1-tom@tromey.com> References: <20170209212456.2385-1-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1cbwD9-0005WN-SP X-Source-Sender: 174-16-146-181.hlrn.qwest.net (bapiya.Home) [174.16.146.181]:47456 X-Source-Auth: tom+tromey.com X-Email-Count: 7 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== I found an unused local variables in a couple of places in the Python code; this removes them. 2017-02-09 Tom Tromey * python/py-value.c (valpy_richcompare_throw): Remove unnecessary "cleanup" local. * python/py-type.c (typy_legacy_template_argument): Remove unnecessary "cleanup" local. --- gdb/ChangeLog | 7 +++++++ gdb/python/py-type.c | 1 - gdb/python/py-value.c | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b00c095..6ff2873 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2017-02-09 Tom Tromey + * python/py-value.c (valpy_richcompare_throw): Remove unnecessary + "cleanup" local. + * python/py-type.c (typy_legacy_template_argument): Remove + unnecessary "cleanup" local. + +2017-02-09 Tom Tromey + * python/python.c (do_start_initialization): New function, from _initialize_python. (_initialize_python): Call do_start_initialization. diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index 9c20582..d3506ca 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -833,7 +833,6 @@ typy_legacy_template_argument (struct type *type, const struct block *block, std::unique_ptr info; const char *err; struct type *argtype; - struct cleanup *cleanup; if (TYPE_NAME (type) == NULL) { diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c index b9b012b..eb3d307 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -1330,7 +1330,6 @@ valpy_richcompare_throw (PyObject *self, PyObject *other, int op) int result; struct value *value_other; struct value *value_self; - struct cleanup *cleanup; scoped_value_mark free_values;