From eb8c15953a316a780f2ea6c8d1eb47c878909d94 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Thu, 31 Dec 2015 19:08:19 +0100 Subject: fix some compiler warnings in gnumach * linux/dev/glue/block.c (out): Cast to device_t. * linux/dev/init/main.c (alloc_contig_mem): Initialize addr and cast return value to void *. * i386/i386/phys.c (pmap_copy_page): Initialize src_map. * i386/intel/pmap.c: Include i386at/model_dep.h. * kern/mach_clock.c (mapable_time_init): Cast to void *. --- linux/dev/glue/block.c | 2 +- linux/dev/init/main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'linux/dev') diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c index da4ef38..453e10b 100644 --- a/linux/dev/glue/block.c +++ b/linux/dev/glue/block.c @@ -1157,7 +1157,7 @@ out: { ipc_kobject_set (bd->port, IKO_NULL, IKOT_NONE); ipc_port_dealloc_kernel (bd->port); - *devp = IP_NULL; + *devp = (device_t) IP_NULL; } kfree ((vm_offset_t) bd, sizeof (struct block_data)); bd = NULL; diff --git a/linux/dev/init/main.c b/linux/dev/init/main.c index ecbd0b6..8737b62 100644 --- a/linux/dev/init/main.c +++ b/linux/dev/init/main.c @@ -193,7 +193,7 @@ alloc_contig_mem (unsigned size, unsigned limit, unsigned *bits, len; void *m; vm_page_t p, page_list, tail, prev; - vm_offset_t addr, max_addr; + vm_offset_t addr = 0, max_addr; if (size == 0) return (NULL); @@ -296,7 +296,7 @@ alloc_contig_mem (unsigned size, unsigned limit, kfree ((vm_offset_t) bits, bits_len); if (pages) *pages = page_list; - return phystokv(m); + return (void *) phystokv(m); } /* -- cgit v1.2.3