Remove unnecessary local variables
authorTom Tromey <tom@tromey.com>
Thu, 9 Feb 2017 20:32:48 +0000 (13:32 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 10 Feb 2017 19:24:34 +0000 (12:24 -0700)
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.

gdb/ChangeLog
gdb/python/py-type.c
gdb/python/py-value.c

index ddf4de0116a65683e97b91104111a020166acc43..1f885b71e3121f0231f1cd2c71adefa40fb77e43 100644 (file)
@@ -1,3 +1,10 @@
+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
index 9c20582abe5b50eb7fa82ea9299904fc835d3ee0..d3506ca21d87d66873c18dd1a7d11d13c3ce3700 100644 (file)
@@ -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)
     {
index b9b012ba7271aa9605a8900a88f8daba19554e09..eb3d307b19bf1e0bd7713e600175cb093dbe795c 100644 (file)
@@ -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;