[binutils-gdb] Remove unnecessary local variables
Tom Tromey
tromey@sourceware.org
Fri Feb 10 19:35:00 GMT 2017
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2d8365c48f797c7b947623eed8b1285d98323b68
commit 2d8365c48f797c7b947623eed8b1285d98323b68
Author: Tom Tromey <tom@tromey.com>
Date: Thu Feb 9 13:32:48 2017 -0700
Remove unnecessary local variables
I found an unused local variables in a couple of places in the Python
code; this removes them.
gdb/ChangeLog
2017-02-10 Tom Tromey <tom@tromey.com>
* python/py-value.c (valpy_richcompare_throw): Remove unnecessary
"cleanup" local.
* python/py-type.c (typy_legacy_template_argument): Remove
unnecessary "cleanup" local.
Diff:
---
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 ddf4de0..1f885b7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2017-02-10 Tom Tromey <tom@tromey.com>
+ * 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-10 Tom Tromey <tom@tromey.com>
+
* 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<demangle_parse_info> 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;
More information about the Gdb-cvs
mailing list