[PATCH 1/3] efi: loader: fix format string for ARM32

Ahmad Fatoum a.fatoum at barebox.org
Thu Jun 11 14:14:20 PDT 2026


size_t is an unsigned long on our ARM64, but an unsigned int on ARM32,
which causes a GCC warning when compiling this printf format string.

Switch to the appropriate %zx format specifier to fix this.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 efi/loader/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/efi/loader/boot.c b/efi/loader/boot.c
index adeb2ff337b3..adcfd96b4648 100644
--- a/efi/loader/boot.c
+++ b/efi/loader/boot.c
@@ -370,7 +370,7 @@ static efi_status_t EFIAPI efi_get_memory_map_ext(
 	r = efi_get_memory_map(memory_map_size, memory_map, map_key,
 			       descriptor_size, descriptor_version);
 
-	__EFI_PRINT("%sEFI: Exit: %s(%zu@%p, %p, 0x%lx@%p, %zu@%p, %u@%p): %u\n",
+	__EFI_PRINT("%sEFI: Exit: %s(%zu@%p, %p, 0x%zx@%p, %zu@%p, %u@%p): %u\n",
 		    __efi_nesting_dec(), __func__,
 		    *memory_map_size, memory_map_size, memory_map,
 		    *map_key, map_key, *descriptor_size, descriptor_size,
-- 
2.47.3




More information about the barebox mailing list