From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 3RU5HjJA1mqR7TIAWB0awg (envelope-from ) for ; Mon, 19 Oct 2026 12:07:14 -0400 Received: by simark.ca (Postfix, from userid 112) id 650C31E050; Mon, 19 Oct 2026 12:07:14 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AD73F1E04E for ; Mon, 19 Oct 2026 12:07:13 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9BA164BA2E25 for ; Mon, 19 Oct 2026 16:07:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BA164BA2E25 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 1A7614BA23D7 for ; Mon, 19 Oct 2026 16:06:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1A7614BA23D7 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1A7614BA23D7 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792426009; cv=none; b=MCiFEPYKCjEVAFQM/KuAPxXtJvuHEClZOnbAGYVGs0QLTFz52MNAseExVfoLylr1IYVwvuSRnDUk0bSIW0LY/3hSHb2oOof0wFZrNrudh0CAY9rji85qFU3Zj3DJc2u5BudMTLVHbeMvyz1hvbydOcXocecdQY/wSeKOmgHQ1yk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792426009; c=relaxed/simple; bh=zQfVx9Uzdhei8Np3RCnCDbs6u2XEN+fI4isZXGSTFcQ=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=v9mcjdGlq9bc3nZHy0iA4OPSo6+x71g56u4uiNg7wqvxyzlI+nNGTGjA7yxkgByLuk/KF/mpwFbKj0bduvonzKcwHm2Dxtor++jJN/umSMy9XcmkkQ/MYP9JON/EFjgVlvUNx0oGg4gsBF6e+LtrRaKLeozx1ebS3gwj/LylX+w= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A7614BA23D7 Received: by simark.ca (Postfix) id C0A8E1E04E; Mon, 19 Oct 2026 12:06:46 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 1/2] gdb/guile: remove unused orig_*_port_scm variables Date: Mon, 19 Oct 2026 12:06:38 -0400 Message-ID: <20261019160644.629989-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.56.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org 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