From ea2b5b8f72c56bde682593e783552eb13b7412ad Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 20 Oct 2009 21:46:20 +0200 Subject: Fix warnings * device/chario.c (ttypush): Set parameter type to void * instead of struct tty *, and implicitly cast the former into the latter instead. * i386/i386at/com.c: Include . (timeout, ttrstrt): Remove declarations. (comtimer): Add unused void * parameter. (comopen): Pass NULL to comtimer function. * i386/i386at/kd.h (kd_belloff): Add unused void * parameter. * i386/i386at/kd.c (timeout): Remove declaration. (kd_belloff): Add unused void * parameter. (feep, kdsetbell): Pass NULL to kd_belloff function. * i386/i386at/lpr.c: Include . (timeout, ttrstrt): Remove declarations. * kern/mach_clock.c (softclock, timeout, untimeout): Set parameter type of fcn function pointer to void * instead of char *. Set type of param to void * instead of char *. * kern/mach_clock.h (timer_elt): Set parameter type of fcn member to void * instead of char *. Set time of param member to void * instead of char *. (timeout): Set parameter type of fcn function pointer parameter to void * instead of char *. (untimeout): Likewise, set type of param parameter to void * instead of char *. * kern/sched_prim.c (sched_init): Remove cast of recompute_priorities. Replace (char *)0 with NULL. (thread_timeout): Set parameter type to void * instead of thread_t, and implicitly cast the former into the latter instead. (thread_timeout_setup): Remove cast of thread_timeout, cast thread_depress_timeout into (void (*) (void*)). Remove cast of thread. (thread_recompute_priorities): Add unused void * parameter. --- kern/mach_clock.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kern/mach_clock.h') diff --git a/kern/mach_clock.h b/kern/mach_clock.h index 4e8b83eb..2009c709 100644 --- a/kern/mach_clock.h +++ b/kern/mach_clock.h @@ -40,8 +40,8 @@ extern int tick; /* number of usec per tick */ /* Time-out element. */ struct timer_elt { queue_chain_t chain; /* chain in order of expiration */ - int (*fcn)(); /* function to call */ - char * param; /* with this parameter */ + void (*fcn)(); /* function to call */ + void * param; /* with this parameter */ unsigned long ticks; /* expiration time, in ticks */ int set; /* unset | set | allocated */ }; @@ -99,7 +99,7 @@ extern kern_return_t host_adjust_time( extern void mapable_time_init (void); /* For public timer elements. */ -extern void timeout(int (*fcn)(void *), void *param, int interval); -extern boolean_t untimeout(int (*fcn)(), char *param); +extern void timeout(void (*fcn)(void *), void *param, int interval); +extern boolean_t untimeout(void (*fcn)(void *), void *param); #endif /* _KERN_MACH_CLOCK_H_ */ -- cgit v1.2.3