* [PATCH 1/2] gdb/guile: remove unused orig_*_port_scm variables
@ 2026-10-19 16:06 Simon Marchi
2026-10-19 16:06 ` [PATCH 2/2] gdb/guile: remove unused escape_symbol variable Simon Marchi
0 siblings, 1 reply; 2+ messages in thread
From: Simon Marchi @ 2026-10-19 16:06 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Building GDB with a recent clang fails with:
/home/smarchi/src/binutils-gdb/gdb/guile/scm-ports.c:72:12: error: variable 'orig_input_port_scm' set but not used [-Werror,-Wunused-but-set-global]
/home/smarchi/src/binutils-gdb/gdb/guile/scm-ports.c:73:12: error: variable 'orig_output_port_scm' set but not used [-Werror,-Wunused-but-set-global]
/home/smarchi/src/binutils-gdb/gdb/guile/scm-ports.c:74:12: error: variable 'orig_error_port_scm' set but not used [-Werror,-Wunused-but-set-global]
These variables hold the original Guile stdio ports, recorded "for
debugging purposes", but nothing reads them. They have been like this
since commit ed3ef33944c3 ("Add Guile as an extension language.",
2014-02-09). I would guess they are not used very often, I think we can
remove them.
Change-Id: I45eb07e49ba606680923f37740da5ac43e6480ad
---
gdb/guile/scm-ports.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/gdb/guile/scm-ports.c b/gdb/guile/scm-ports.c
index e8ded385f16e..05b8fec30390 100644
--- a/gdb/guile/scm-ports.c
+++ b/gdb/guile/scm-ports.c
@@ -67,12 +67,6 @@ struct ioscm_memory_port
ULONGEST current;
};
-/* Copies of the original system input/output/error ports.
- These are recorded for debugging purposes. */
-static SCM orig_input_port_scm;
-static SCM orig_output_port_scm;
-static SCM orig_error_port_scm;
-
/* This is the stdio port descriptor, scm_ptob_descriptor. */
static scm_t_port_type *stdio_port_desc;
@@ -797,12 +791,6 @@ This procedure is experimental." },
void
gdbscm_initialize_ports (void)
{
- /* Save the original stdio ports for debugging purposes. */
-
- orig_input_port_scm = scm_current_input_port ();
- orig_output_port_scm = scm_current_output_port ();
- orig_error_port_scm = scm_current_error_port ();
-
/* Set up the stdio ports. */
ioscm_init_gdb_stdio_port ();
base-commit: ec9be4b35cf367e6ffa0d5881fb20e60c68e2f89
--
2.56.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] gdb/guile: remove unused escape_symbol variable
2026-10-19 16:06 [PATCH 1/2] gdb/guile: remove unused orig_*_port_scm variables Simon Marchi
@ 2026-10-19 16:06 ` Simon Marchi
0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2026-10-19 16:06 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Building GDB with a recent clang fails with:
/home/smarchi/src/binutils-gdb/gdb/guile/scm-value.c:78:12: error: variable 'escape_symbol' set but not used [-Werror,-Wunused-but-set-global]
value->string only accepts 'error and 'substitute for its #:errors
argument, so the 'escape symbol is never used. It has been unused since
commit ed3ef33944c3 ("Add Guile as an extension language.",
2014-02-09). Remove it.
Change-Id: Ie088e3c133c4443a0131d5b9830814724be405fe
---
gdb/guile/scm-value.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c
index 277195688093..0e388bf1f056 100644
--- a/gdb/guile/scm-value.c
+++ b/gdb/guile/scm-value.c
@@ -75,7 +75,6 @@ static SCM length_keyword;
/* Possible #:errors values. */
static SCM error_symbol;
-static SCM escape_symbol;
static SCM substitute_symbol;
\f
/* Administrivia for value smobs. */
@@ -1541,6 +1540,5 @@ gdbscm_initialize_values (void)
length_keyword = scm_from_latin1_keyword ("length");
error_symbol = scm_from_latin1_symbol ("error");
- escape_symbol = scm_from_latin1_symbol ("escape");
substitute_symbol = scm_from_latin1_symbol ("substitute");
}
--
2.56.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-19 16:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-19 16:06 [PATCH 1/2] gdb/guile: remove unused orig_*_port_scm variables Simon Marchi
2026-10-19 16:06 ` [PATCH 2/2] gdb/guile: remove unused escape_symbol variable Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox