public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r13-8056] libstdc++: Remove unused locals from printers.py
Date: Mon, 13 Nov 2023 15:45:01 +0000 (GMT)	[thread overview]
Message-ID: <20231113154501.06E76389A8C1@sourceware.org> (raw)

https://gcc.gnu.org/g:1acbf91d6a26a2596338f5e44a2c396eebe355f4

commit r13-8056-g1acbf91d6a26a2596338f5e44a2c396eebe355f4
Author: Tom Tromey <tromey@adacore.com>
Date:   Tue Sep 26 13:58:57 2023 -0600

    libstdc++: Remove unused locals from printers.py
    
    flake8 pointed out some unused local variables in the libstdc++
    pretty-printers.  This removes them.
    
    libstdc++-v3/ChangeLog:
    
            * python/libstdcxx/v6/printers.py
            (StdExpOptionalPrinter.__init__, lookup_node_type):
            Remove unused variables.
    
    (cherry picked from commit 33841921a2b1153e6d79f0b4a5870f12aa2e86a1)

Diff:
---
 libstdc++-v3/python/libstdcxx/v6/printers.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 0f7327b54e9..c5ecd881b73 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -174,7 +174,7 @@ def lookup_node_type(nodename, containertype):
     valtype = valtype.strip_typedefs()
     try:
         return lookup_templ_spec(nodename, valtype)
-    except gdb.error as e:
+    except gdb.error:
         # For debug mode containers the node is in std::__cxx1998.
         if is_member_of_namespace(nodename, 'std'):
             if is_member_of_namespace(containertype, 'std::__cxx1998',
@@ -1449,7 +1449,6 @@ class StdExpOptionalPrinter(SingleObjContainerPrinter):
     """Print a std::optional or std::experimental::optional."""
 
     def __init__(self, typename, val):
-        valtype = self._recognize(val.type.template_argument(0))
         typename = strip_versioned_namespace(typename)
         self._typename = re.sub(
             r'^std::(experimental::|)(fundamentals_v\d::|)(.*)',

                 reply	other threads:[~2023-11-13 15:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231113154501.06E76389A8C1@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).