Hi folks,
Here is another patch that cleans up the "makes foo from bar without a
cast" warnings.
I'm a little curious if using (void *)port cast is correct in the calls
to tty_portdeath()?
I also could use some guidance on these warnings (they all come from
basically the same call):
../kern/startup.c:297: warning: passing argument 1 of 'kvtophys' makes
integer from pointer without a cast
../i386/i386/pcb.c:236: warning: passing argument 1 of 'kvtophys' makes
integer from pointer without a cast
../i386/i386/pcb.c:311: warning: passing argument 1 of 'kvtophys' makes
integer from pointer without a cast
Also, I am still not "fixing" anything under linux/*
I haven't included a changelog yet since this will probably need
reviewed and/or fixed.
Thanks as always,
Barry
? INSTALL
? Makefile.in
? aclocal.m4
? autom4te.cache
? build-aux
? config.h.in
? configure
? doc/mach.info
? doc/mach.info-1
? doc/mach.info-2
? doc/stamp-vti
? doc/version.texi
Index: i386/i386at/com.c
===================================================================
RCS file: /sources/hurd/gnumach/i386/i386at/Attic/com.c,v
retrieving revision 1.3.2.6
diff -u -p -r1.3.2.6 com.c
--- i386/i386at/com.c 20 Jul 2008 17:05:37 -0000 1.3.2.6
+++ i386/i386at/com.c 22 Jul 2008 17:12:39 -0000
@@ -433,7 +433,7 @@ io_return_t comportdeath(dev, port)
dev_t dev;
mach_port_t port;
{
- return (tty_portdeath(&com_tty[minor(dev)], port));
+ return (tty_portdeath(&com_tty[minor(dev)], (void *)port));
}
io_return_t
Index: i386/i386at/kd.c
===================================================================
RCS file: /sources/hurd/gnumach/i386/i386at/Attic/kd.c,v
retrieving revision 1.5.2.15
diff -u -p -r1.5.2.15 kd.c
--- i386/i386at/kd.c 20 Jul 2008 17:05:38 -0000 1.5.2.15
+++ i386/i386at/kd.c 22 Jul 2008 17:12:40 -0000
@@ -590,7 +590,7 @@ kdportdeath(dev, port)
dev_t dev;
mach_port_t port;
{
- return (tty_portdeath(&kd_tty, port));
+ return (tty_portdeath(&kd_tty, (void *)port));
}
/*ARGSUSED*/
Index: i386/i386at/kd_mouse.c
===================================================================
RCS file: /sources/hurd/gnumach/i386/i386at/Attic/kd_mouse.c,v
retrieving revision 1.3.2.9
diff -u -p -r1.3.2.9 kd_mouse.c
--- i386/i386at/kd_mouse.c 20 Jul 2008 17:05:38 -0000 1.3.2.9
+++ i386/i386at/kd_mouse.c 22 Jul 2008 17:12:40 -0000
@@ -603,7 +603,7 @@ mouse_handle_byte(ch)
mousebuf[mousebufindex++] = ch;
if (mouse_char_wanted) {
mouse_char_wanted = FALSE;
- wakeup(&mousebuf);
+ wakeup((unsigned int)&mousebuf);
}
return;
}
Index: i386/i386at/lpr.c
===================================================================
RCS file: /sources/hurd/gnumach/i386/i386at/Attic/lpr.c,v
retrieving revision 1.1.1.1.4.10
diff -u -p -r1.1.1.1.4.10 lpr.c
--- i386/i386at/lpr.c 20 Jul 2008 17:05:38 -0000 1.1.1.1.4.10
+++ i386/i386at/lpr.c 22 Jul 2008 17:12:40 -0000
@@ -202,7 +202,7 @@ lprportdeath(dev, port)
dev_t dev;
mach_port_t port;
{
- return (tty_portdeath(&lpr_tty[minor(dev)], port));
+ return (tty_portdeath(&lpr_tty[minor(dev)], (void *)port));
}
io_return_t
Index: i386/intel/pmap.c
===================================================================
RCS file: /sources/hurd/gnumach/i386/intel/pmap.c,v
retrieving revision 1.4.2.19
diff -u -p -r1.4.2.19 pmap.c
--- i386/intel/pmap.c 18 Nov 2007 17:33:07 -0000 1.4.2.19
+++ i386/intel/pmap.c 22 Jul 2008 17:12:41 -0000
@@ -927,7 +927,7 @@ void pmap_destroy(p)
vm_object_unlock(pmap_object);
}
}
- kmem_free(kernel_map, p->dirbase, INTEL_PGBYTES);
+ kmem_free(kernel_map, (vm_offset_t)p->dirbase, INTEL_PGBYTES);
zfree(pmap_zone, (vm_offset_t) p);
}
Index: ipc/ipc_kmsg.c
===================================================================
RCS file: /sources/hurd/gnumach/ipc/ipc_kmsg.c,v
retrieving revision 1.2.2.11
diff -u -p -r1.2.2.11 ipc_kmsg.c
--- ipc/ipc_kmsg.c 16 Jul 2008 00:51:03 -0000 1.2.2.11
+++ ipc/ipc_kmsg.c 22 Jul 2008 17:12:41 -0000
@@ -531,7 +531,7 @@ ipc_kmsg_get(msg, size, kmsgp)
ikm_init(kmsg, size);
}
- if (copyinmsg((char *) msg, (char *) &kmsg->ikm_header, size)) {
+ if (copyinmsg((vm_offset_t) msg, (vm_offset_t) &kmsg->ikm_header,
size)) {
ikm_free(kmsg);
return MACH_SEND_INVALID_DATA;
}
@@ -601,7 +601,7 @@ ipc_kmsg_put(msg, kmsg, size)
ikm_check_initialized(kmsg, kmsg->ikm_size);
- if (copyoutmsg((char *) &kmsg->ikm_header, (char *) msg, size))
+ if (copyoutmsg((vm_offset_t) &kmsg->ikm_header, (vm_offset_t) msg,
size))
mr = MACH_RCV_INVALID_DATA;
else
mr = MACH_MSG_SUCCESS;
Index: ipc/mach_msg.c
===================================================================
RCS file: /sources/hurd/gnumach/ipc/mach_msg.c,v
retrieving revision 1.2.2.9
diff -u -p -r1.2.2.9 mach_msg.c
--- ipc/mach_msg.c 30 Apr 2007 20:30:11 -0000 1.2.2.9
+++ ipc/mach_msg.c 22 Jul 2008 17:12:42 -0000
@@ -222,8 +222,8 @@ mach_msg_receive(msg, option, rcv_size,
assert(real_size > rcv_size);
- (void) copyout((vm_offset_t) &real_size,
- (vm_offset_t) &msg->msgh_size,
+ (void) copyout(&real_size,
+ &msg->msgh_size,
sizeof(mach_msg_size_t));
}
@@ -313,8 +313,8 @@ mach_msg_receive_continue(void)
assert(real_size > rcv_size);
- (void) copyout((vm_offset_t) &real_size,
- (vm_offset_t) &msg->msgh_size,
+ (void) copyout(&real_size,
+ &msg->msgh_size,
sizeof(mach_msg_size_t));
}
Index: kern/bootstrap.c
===================================================================
RCS file: /sources/hurd/gnumach/kern/bootstrap.c,v
retrieving revision 1.12.2.11
diff -u -p -r1.12.2.11 bootstrap.c
--- kern/bootstrap.c 17 Jul 2008 01:02:01 -0000 1.12.2.11
+++ kern/bootstrap.c 22 Jul 2008 17:12:42 -0000
@@ -435,7 +435,7 @@ read_exec(void *handle, vm_offset_t file
if (file_size > 0)
{
err = copyout((char *)phystokv (mod->mod_start) + file_ofs,
- mem_addr, file_size);
+ (char *)mem_addr, file_size);
assert(err == 0);
}
Index: kern/ipc_tt.c
===================================================================
RCS file: /sources/hurd/gnumach/kern/ipc_tt.c,v
retrieving revision 1.3.2.5
diff -u -p -r1.3.2.5 ipc_tt.c
--- kern/ipc_tt.c 30 Apr 2007 20:30:11 -0000 1.3.2.5
+++ kern/ipc_tt.c 22 Jul 2008 17:12:42 -0000
@@ -833,7 +833,7 @@ mach_ports_register(
*/
for (i = 0; i < portsCnt; i++)
- ports[i] = memory[i];
+ ports[i] = (ipc_port_t)memory[i];
for (; i < TASK_PORT_REGISTER_MAX; i++)
ports[i] = IP_NULL;