git: 8a4e4c95244b - main - loader.efi: Properly scope variable
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 13 Sep 2025 15:47:34 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=8a4e4c95244b9082c7f423f7206c1d2b90ffb628
commit 8a4e4c95244b9082c7f423f7206c1d2b90ffb628
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-09-13 15:46:25 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-09-13 15:46:25 +0000
loader.efi: Properly scope variable
guid here is only used for EFI_ZFS_BOOT, so move the ifdef.
Noticed by: wosch and clang 20
Sponsored by: Netflix
---
stand/efi/loader/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
index 3e179bd4296c..304b2e48272c 100644
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -315,9 +315,9 @@ probe_md_currdev(void)
static bool
try_as_currdev(pdinfo_t *hd, pdinfo_t *pp)
{
+#ifdef EFI_ZFS_BOOT
uint64_t guid;
-#ifdef EFI_ZFS_BOOT
/*
* If there's a zpool on this device, try it as a ZFS
* filesystem, which has somewhat different setup than all