cmd: efidebug: fix int to pointer cast
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 27 Mar 2020 04:33:17 +0000 (04:33 +0000)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 28 Mar 2020 09:45:03 +0000 (10:45 +0100)
On 32 bit systems fix
warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]

Fixes: a415d61eac26 ("cmd: map addresses to sysmem in efidebug memmap")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
cmd/efidebug.c

index bb7c13d6a1ce7e636548aff1b64268a986b72b9d..c1bb76477a6709a6f159c3294e4be109d6480bcb 100644 (file)
@@ -489,10 +489,12 @@ static int do_efi_show_memmap(cmd_tbl_t *cmdtp, int flag,
 
                printf("%-16s %.*llx-%.*llx", type,
                       EFI_PHYS_ADDR_WIDTH,
-                      (u64)map_to_sysmem((void *)map->physical_start),
+                      (u64)map_to_sysmem((void *)(uintptr_t)
+                                         map->physical_start),
                       EFI_PHYS_ADDR_WIDTH,
-                      (u64)map_to_sysmem((void *)map->physical_start +
-                                         map->num_pages * EFI_PAGE_SIZE));
+                      (u64)map_to_sysmem((void *)(uintptr_t)
+                                         (map->physical_start +
+                                          map->num_pages * EFI_PAGE_SIZE)));
 
                print_memory_attributes(map->attribute);
                putc('\n');