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: --- kern/syscall_sw.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'kern/syscall_sw.h') diff --git a/kern/syscall_sw.h b/kern/syscall_sw.h index 80b1810b..34eaf90b 100644 --- a/kern/syscall_sw.h +++ b/kern/syscall_sw.h @@ -35,9 +35,11 @@ * Note: this is indexed manually by locore.S! */ +typedef void (*generic_trap_function)(void); + typedef struct { int mach_trap_arg_count; - int (*mach_trap_function)(); + generic_trap_function mach_trap_function; boolean_t mach_trap_stack; const char *mach_trap_name; } mach_trap_t; @@ -46,8 +48,8 @@ extern mach_trap_t mach_trap_table[]; extern int mach_trap_count; #define MACH_TRAP(name, arg_count) \ - { (arg_count), (int (*)()) (name), FALSE, #name } + { (arg_count), (generic_trap_function) (name), FALSE, #name } #define MACH_TRAP_STACK(name, arg_count) \ - { (arg_count), (int (*)()) (name), TRUE, #name } + { (arg_count), (generic_trap_function) (name), TRUE, #name } #endif /* _KERN_SYSCALL_SW_H_ */ -- cgit v1.2.3