aboutsummaryrefslogtreecommitdiffstats
path: root/com32/mboot
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-02-07 20:05:52 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-02-07 20:05:52 -0800
commit458a54133ecdf1685c02294d812cb562fe7bf4c3 (patch)
treef3dc3a87dfdeb5d179e3f4ef73bf74d651136432 /com32/mboot
parentb40487005223a78c3bb4c300ef6c436b3f6ec1f7 (diff)
downloadsyslinux-458a54133ecdf1685c02294d812cb562fe7bf4c3.tar.gz
syslinux-458a54133ecdf1685c02294d812cb562fe7bf4c3.tar.xz
syslinux-458a54133ecdf1685c02294d812cb562fe7bf4c3.zip
Fix all warnings, and better separate code that should not be mixedsyslinux-6.04-pre3
Clean up a number of warnings in the tree. Refactor especially the core code so we don't end up building a bunch of BIOS-specific code for EFI, and general build cleanups. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'com32/mboot')
-rw-r--r--com32/mboot/map.c12
-rw-r--r--com32/mboot/mem.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/com32/mboot/map.c b/com32/mboot/map.c
index 97b5b5d7..41024f92 100644
--- a/com32/mboot/map.c
+++ b/com32/mboot/map.c
@@ -61,7 +61,7 @@ addr_t map_data(const void *data, size_t len, size_t align, int flags)
return 0;
}
- dprintf("Mapping 0x%08zx bytes (%#x pad) at 0x%08x\n", len, pad, start);
+ dprintf("Mapping 0x%08zx bytes (%#zx pad) at 0x%08zx\n", len, pad, start);
if (start + len + pad > mboot_high_water_mark)
mboot_high_water_mark = start + len + pad;
@@ -200,12 +200,12 @@ struct multiboot_header *map_image(void *ptr, size_t len)
&& eh->e_entry < ph->p_vaddr + msize)
regs.eip = eh->e_entry + (ph->p_paddr - ph->p_vaddr);
- dprintf("Segment at 0x%08x data 0x%08x len 0x%08x\n",
+ dprintf("Segment at 0x%08zx data 0x%08zx len 0x%08zx\n",
addr, dsize, msize);
if (syslinux_memmap_type(amap, addr, msize) != SMT_FREE) {
printf
- ("Memory segment at 0x%08x (len 0x%08x) is unavailable\n",
+ ("Memory segment at 0x%08zx (len 0x%08zx) is unavailable\n",
addr, msize);
return NULL; /* Memory region unavailable */
}
@@ -306,12 +306,12 @@ struct multiboot_header *map_image(void *ptr, size_t len)
&& eh64->e_entry < ph64->p_vaddr + msize)
regs.eip = eh64->e_entry + (ph64->p_paddr - ph64->p_vaddr);
- dprintf("Segment at 0x%08x data 0x%08x len 0x%08x\n",
+ dprintf("Segment at 0x%08zx data 0x%08zx len 0x%08zx\n",
addr, dsize, msize);
if (syslinux_memmap_type(amap, addr, msize) != SMT_FREE) {
printf
- ("Memory segment at 0x%08x (len 0x%08x) is unavailable\n",
+ ("Memory segment at 0x%08zx (len 0x%08zx) is unavailable\n",
addr, msize);
return NULL; /* Memory region unavailable */
}
@@ -414,7 +414,7 @@ struct multiboot_header *map_image(void *ptr, size_t len)
if (syslinux_memmap_type(amap, mbh->load_addr, data_len + bss_len)
!= SMT_FREE) {
- printf("Memory segment at 0x%08x (len 0x%08x) is unavailable\n",
+ printf("Memory segment at 0x%08x (len 0x%08zx) is unavailable\n",
mbh->load_addr, data_len + bss_len);
return NULL; /* Memory region unavailable */
}
diff --git a/com32/mboot/mem.c b/com32/mboot/mem.c
index d5c559a7..738291e5 100644
--- a/com32/mboot/mem.c
+++ b/com32/mboot/mem.c
@@ -169,7 +169,7 @@ out:
void mboot_make_memmap(void)
{
int i, nmap;
- struct AddrRangeDesc *ard;
+ struct AddrRangeDesc *ard = NULL;
uint32_t lowmem, highmem;
uint32_t highrsvd;