git: fa4f76eecbf2 - stable/14 - stand: remove unused variables

From: Kyle Evans <kevans_at_FreeBSD.org>
Date: Mon, 21 Sep 2026 13:21:46 UTC
The branch stable/14 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=fa4f76eecbf21b440a0afaf3360065c619b95258

commit fa4f76eecbf21b440a0afaf3360065c619b95258
Author:     Ahmad Khalifa <vexeduxr@FreeBSD.org>
AuthorDate: 2025-09-09 17:19:24 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2026-09-21 13:21:13 +0000

    stand: remove unused variables
    
    (cherry picked from commit 7d48a56205224cfa969c32b47496dc8ac6a6a637)
---
 stand/common/gfx_fb.c                    | 1 -
 stand/efi/loader/arch/amd64/multiboot2.c | 2 --
 stand/efi/loader/arch/amd64/trap.c       | 1 -
 stand/efi/loader/bootinfo.c              | 3 +--
 stand/efi/loader/copy.c                  | 2 +-
 stand/efi/loader/main.c                  | 4 +---
 6 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c
index 92abaed91f6b..36cbd74143fa 100644
--- a/stand/common/gfx_fb.c
+++ b/stand/common/gfx_fb.c
@@ -267,7 +267,6 @@ void
 gfx_fb_setcolors(teken_attr_t *attr, ev_sethook_t sethook,
      ev_unsethook_t unsethook)
 {
-	const char *ptr;
 	bool need_setattr = false;
 
 	/*
diff --git a/stand/efi/loader/arch/amd64/multiboot2.c b/stand/efi/loader/arch/amd64/multiboot2.c
index 130caa82aa49..4f070f1d179a 100644
--- a/stand/efi/loader/arch/amd64/multiboot2.c
+++ b/stand/efi/loader/arch/amd64/multiboot2.c
@@ -80,7 +80,6 @@ loadfile(char *filename, uint64_t dest, struct preloaded_file **result)
 	void			*multiboot = NULL;
 	ssize_t			 search_size;
 	struct multiboot_header	*header;
-	char			*cmdline;
 	struct mb2hdr		 hdr;
 	bool			 keep_bs = false;
 
@@ -496,7 +495,6 @@ static int
 obj_loadfile(char *filename, uint64_t dest, struct preloaded_file **result)
 {
 	struct preloaded_file	*mfp, *kfp, *rfp;
-	struct kernel_module	*kmp;
 	int			 error;
 
 	/* See if there's a multiboot kernel loaded */
diff --git a/stand/efi/loader/arch/amd64/trap.c b/stand/efi/loader/arch/amd64/trap.c
index 95a42a18f719..4456bbc6d412 100644
--- a/stand/efi/loader/arch/amd64/trap.c
+++ b/stand/efi/loader/arch/amd64/trap.c
@@ -87,7 +87,6 @@ report_exc(struct trapframe *tf)
 	struct frame *fp;
 	uintptr_t pc, base;
 	char buf[80];
-	int ret;
 
 	base = (uintptr_t)boot_img->ImageBase;
 	/*
diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c
index e56cd90ed7b8..f1ee306845bb 100644
--- a/stand/efi/loader/bootinfo.c
+++ b/stand/efi/loader/bootinfo.c
@@ -71,8 +71,7 @@ static int
 bi_getboothowto(char *kargs)
 {
 #ifdef EFI
-	const char *sw, *tmp;
-	char *opts;
+	const char *tmp;
 	int speed, port;
 	char buf[50];
 #endif
diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c
index 90a55089ffc4..97fbd82079a8 100644
--- a/stand/efi/loader/copy.c
+++ b/stand/efi/loader/copy.c
@@ -256,7 +256,7 @@ static int
 command_staging_slop(int argc, char *argv[])
 {
 	char *endp;
-	u_long new, prev;
+	u_long new;
 
 	if (argc > 2) {
 		goto err;
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
index 0fdfeab118f2..46ce7467f531 100644
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -990,7 +990,7 @@ main(int argc, CHAR16 *argv[])
 	EFI_DEVICE_PATH *imgpath;
 	CHAR16 *text;
 	EFI_STATUS rv;
-	size_t sz, bosz = 0, bisz = 0;
+	size_t sz, bisz = 0;
 	UINT16 boot_order[100];
 	char boot_info[4096];
 	char buf[32];
@@ -1196,14 +1196,12 @@ main(int argc, CHAR16 *argv[])
 				    boot_order[i] == boot_current ? "[*]" : "");
 			printf("\n");
 			is_last = boot_order[(sz / sizeof(boot_order[0])) - 1] == boot_current;
-			bosz = sz;
 		} else if (uefi_boot_mgr) {
 			/*
 			 * u-boot doesn't set BootOrder, but otherwise participates in the
 			 * boot manager protocol. So we fake it here and don't consider it
 			 * a failure.
 			 */
-			bosz = sizeof(boot_order[0]);
 			boot_order[0] = boot_current;
 			is_last = true;
 		}