From 448889a4f0c32ba8ea61f870d4edcb0e0d58af85 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Tue, 20 Dec 2022 20:01:02 -0500 Subject: Use -Wstrict-prototypes and fix warnings Most of the changes include defining and using proper function type declarations (with argument types declared) and avoiding using the K&R style of function declarations. Message-Id: --- device/dev_lookup.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'device/dev_lookup.c') diff --git a/device/dev_lookup.c b/device/dev_lookup.c index 9af7508c..e9d38925 100644 --- a/device/dev_lookup.c +++ b/device/dev_lookup.c @@ -70,8 +70,7 @@ struct kmem_cache dev_hdr_cache; * The number table lock must be held. */ void -dev_number_enter(device) - const mach_device_t device; +dev_number_enter(const mach_device_t device) { queue_t q; @@ -84,8 +83,7 @@ dev_number_enter(device) * The device-number table lock must be held. */ void -dev_number_remove(device) - const mach_device_t device; +dev_number_remove(const mach_device_t device) { queue_t q; @@ -98,9 +96,7 @@ dev_number_remove(device) * The number table lock must be held. */ mach_device_t -dev_number_lookup(ops, devnum) - const dev_ops_t ops; - int devnum; +dev_number_lookup(const dev_ops_t ops, int devnum) { queue_t q; mach_device_t device; @@ -316,7 +312,7 @@ convert_device_to_port(device) */ boolean_t dev_map( - boolean_t (*routine)(), + dev_map_fn routine, mach_port_t port) { int i; -- cgit v1.2.3