public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-4321] libstdc++: Remove unused locals from printers.py
@ 2023-09-28 20:56 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-09-28 20:56 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:33841921a2b1153e6d79f0b4a5870f12aa2e86a1
commit r14-4321-g33841921a2b1153e6d79f0b4a5870f12aa2e86a1
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.
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::|)(.*)',
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-28 20:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-28 20:56 [gcc r14-4321] libstdc++: Remove unused locals from printers.py Tom Tromey
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).