diff options
-rw-r--r-- | ddb/db_aout.c | 4 | ||||
-rw-r--r-- | ddb/db_break.c | 4 | ||||
-rw-r--r-- | ddb/db_break.h | 6 | ||||
-rw-r--r-- | ddb/db_command.c | 2 | ||||
-rw-r--r-- | ddb/db_command.h | 2 | ||||
-rw-r--r-- | ddb/db_output.c | 2 | ||||
-rw-r--r-- | ddb/db_output.h | 2 | ||||
-rw-r--r-- | ddb/db_run.c | 2 | ||||
-rw-r--r-- | ddb/db_sym.c | 2 | ||||
-rw-r--r-- | ddb/db_watch.c | 3 | ||||
-rw-r--r-- | device/blkio.c | 2 | ||||
-rw-r--r-- | device/conf.h | 6 | ||||
-rw-r--r-- | device/dev_name.c | 2 | ||||
-rw-r--r-- | device/ds_routines.c | 2 | ||||
-rw-r--r-- | device/net_io.h | 2 | ||||
-rw-r--r-- | i386/i386/mp_desc.c | 2 | ||||
-rw-r--r-- | include/string.h | 8 | ||||
-rw-r--r-- | kern/bootstrap.c | 4 | ||||
-rw-r--r-- | kern/machine.c | 4 | ||||
-rw-r--r-- | kern/sched_prim.h | 4 | ||||
-rw-r--r-- | kern/startup.c | 2 | ||||
-rw-r--r-- | kern/strings.c | 6 | ||||
-rw-r--r-- | vm/pmap.h | 2 | ||||
-rw-r--r-- | vm/vm_resident.c | 2 |
24 files changed, 38 insertions, 39 deletions
diff --git a/ddb/db_aout.c b/ddb/db_aout.c index 57c680a..87ba975 100644 --- a/ddb/db_aout.c +++ b/ddb/db_aout.c @@ -132,7 +132,7 @@ aout_db_sym_init(symtab, esymtab, name, task_addr) /* * check file name or not (check xxxx.x pattern) */ -private boolean_t +private boolean_t __attribute__ ((pure)) aout_db_is_filename(name) const char *name; { @@ -149,7 +149,7 @@ aout_db_is_filename(name) /* * special name comparison routine with a name in the symbol table entry */ -private boolean_t +private boolean_t __attribute__ ((pure)) aout_db_eq_name(sp, name) const struct nlist *sp; const char *name; diff --git a/ddb/db_break.c b/ddb/db_break.c index e41834d..0534f68 100644 --- a/ddb/db_break.c +++ b/ddb/db_break.c @@ -154,7 +154,7 @@ db_delete_thread_breakpoint(bkpt, task_thd) } } -static db_thread_breakpoint_t +static db_thread_breakpoint_t __attribute__ ((pure)) db_find_thread_breakpoint(bkpt, thread) const db_breakpoint_t bkpt; const thread_t thread; @@ -350,7 +350,7 @@ db_delete_breakpoint(task, addr, task_thd) } } -db_breakpoint_t +db_breakpoint_t __attribute__ ((pure)) db_find_breakpoint(task, addr) const task_t task; db_addr_t addr; diff --git a/ddb/db_break.h b/ddb/db_break.h index ad86119..610af2f 100644 --- a/ddb/db_break.h +++ b/ddb/db_break.h @@ -71,7 +71,7 @@ struct db_breakpoint { typedef struct db_breakpoint *db_breakpoint_t; -extern db_breakpoint_t db_find_breakpoint( const task_t task, db_addr_t addr); +extern db_breakpoint_t db_find_breakpoint( const task_t task, db_addr_t addr) __attribute__ ((pure)); extern boolean_t db_find_breakpoint_here( const task_t task, db_addr_t addr); extern void db_set_breakpoints(void); extern void db_clear_breakpoints(void); @@ -88,9 +88,9 @@ extern db_breakpoint_t db_set_breakpoint(const task_t task, db_addr_t addr, int count, const thread_t thread, boolean_t task_bpt); -void db_listbreak_cmd(); +void db_listbreak_cmd(void); -void db_delete_cmd(); +void db_delete_cmd(void); void db_breakpoint_cmd( db_expr_t addr, diff --git a/ddb/db_command.c b/ddb/db_command.c index 3257e07..3879ec5 100644 --- a/ddb/db_command.c +++ b/ddb/db_command.c @@ -522,7 +522,7 @@ db_fncall(void) db_printf(" %#N\n", retval); } -boolean_t +boolean_t __attribute__ ((pure)) db_option(modif, option) const char *modif; int option; diff --git a/ddb/db_command.h b/ddb/db_command.h index 634dd9d..4208bda 100644 --- a/ddb/db_command.h +++ b/ddb/db_command.h @@ -41,7 +41,7 @@ #include <machine/setjmp.h> extern void db_command_loop(void); -extern boolean_t db_option(const char *, int); +extern boolean_t db_option(const char *, int) __attribute__ ((pure)); extern void db_error(const char *) __attribute__ ((noreturn)); /* report error */ diff --git a/ddb/db_output.c b/ddb/db_output.c index f7561d2..f2829cc 100644 --- a/ddb/db_output.c +++ b/ddb/db_output.c @@ -188,7 +188,7 @@ db_id_putc(char c, vm_offset_t dummy) /* * Return output position */ -int +int __attribute__ ((pure)) db_print_position(void) { return (db_output_position); diff --git a/ddb/db_output.h b/ddb/db_output.h index e886647..497ae43 100644 --- a/ddb/db_output.h +++ b/ddb/db_output.h @@ -36,7 +36,7 @@ #define _DDB_DB_OUTPUT_H_ extern void db_force_whitespace(void); -extern int db_print_position(void); +extern int db_print_position(void) __attribute__ ((pure)); extern void db_end_line(void); extern void db_printf(const char *fmt, ...); /* alternate name */ diff --git a/ddb/db_run.c b/ddb/db_run.c index 945d097..6e409ff 100644 --- a/ddb/db_run.c +++ b/ddb/db_run.c @@ -249,7 +249,7 @@ db_single_step(regs, task) db_breakpoint_t db_not_taken_bkpt = 0; db_breakpoint_t db_taken_bkpt = 0; -db_breakpoint_t +db_breakpoint_t __attribute__ ((pure)) db_find_temp_breakpoint(task, addr) const task_t task; db_addr_t addr; diff --git a/ddb/db_sym.c b/ddb/db_sym.c index bbf14bd..beb4d18 100644 --- a/ddb/db_sym.c +++ b/ddb/db_sym.c @@ -88,7 +88,7 @@ db_add_symbol_table(type, start, end, name, ref, map_pointer) * Note: return value points to static data whose content is * overwritten by each call... but in practice this seems okay. */ -static char * +static char * __attribute__ ((pure)) db_qualify(symname, symtabname) const char *symname; const char *symtabname; diff --git a/ddb/db_watch.c b/ddb/db_watch.c index c8a4286..dbb4aea 100644 --- a/ddb/db_watch.c +++ b/ddb/db_watch.c @@ -65,7 +65,7 @@ db_watchpoint_t db_watchpoint_list = 0; extern vm_map_t kernel_map; db_watchpoint_t -db_watchpoint_alloc() +db_watchpoint_alloc(void) { db_watchpoint_t watch; @@ -242,7 +242,6 @@ db_watchpoint_cmd(addr, have_addr, count, modif) vm_size_t size; db_expr_t value; task_t task; - boolean_t db_option(); if (db_get_task(modif, &task, addr) < 0) return; diff --git a/device/blkio.c b/device/blkio.c index 939067d..52d8c00 100644 --- a/device/blkio.c +++ b/device/blkio.c @@ -102,7 +102,7 @@ void minphys(ior) * Dummy routine placed in device switch entries to indicate that * block device may be mapped. */ -vm_offset_t block_io_mmap() +vm_offset_t block_io_mmap(void) { return (0); } diff --git a/device/conf.h b/device/conf.h index 8aacc86..a0d5010 100644 --- a/device/conf.h +++ b/device/conf.h @@ -58,9 +58,9 @@ typedef struct dev_ops *dev_ops_t; /* * Routines for null entries. */ -extern int nulldev(); /* no operation - OK */ -extern int nodev(); /* no operation - error */ -extern vm_offset_t nomap(); /* no operation - error */ +extern int nulldev(void); /* no operation - OK */ +extern int nodev(void); /* no operation - error */ +extern vm_offset_t nomap(void); /* no operation - error */ /* * Flavor constants for d_dev_info routine diff --git a/device/dev_name.c b/device/dev_name.c index 49d96aa..4cc046a 100644 --- a/device/dev_name.c +++ b/device/dev_name.c @@ -63,7 +63,7 @@ nomap(void) * src and target are equal in first 'len' characters * next character of target is 0 (end of string). */ -boolean_t +boolean_t __attribute__ ((pure)) name_equal(src, len, target) const char *src; int len; diff --git a/device/ds_routines.c b/device/ds_routines.c index c99818b..82b5252 100644 --- a/device/ds_routines.c +++ b/device/ds_routines.c @@ -99,7 +99,7 @@ extern struct device_emulation_ops linux_block_emulation_ops; #ifdef CONFIG_INET extern struct device_emulation_ops linux_net_emulation_ops; -extern void free_skbuffs (); +extern void free_skbuffs (void); #ifdef CONFIG_PCMCIA extern struct device_emulation_ops linux_pcmcia_emulation_ops; #endif /* CONFIG_PCMCIA */ diff --git a/device/net_io.h b/device/net_io.h index e68e64a..f6de854 100644 --- a/device/net_io.h +++ b/device/net_io.h @@ -74,7 +74,7 @@ extern void net_kmsg_put(ipc_kmsg_t); * Network utility routines. */ -extern void net_ast(); +extern void net_ast(void); extern void net_packet(struct ifnet *, ipc_kmsg_t, unsigned int, boolean_t); extern void net_filter(ipc_kmsg_t, ipc_kmsg_queue_t); extern io_return_t net_getstat(struct ifnet *, dev_flavor_t, dev_status_t, diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c index 4ff5e61..2ffe8ac 100644 --- a/i386/i386/mp_desc.c +++ b/i386/i386/mp_desc.c @@ -171,7 +171,7 @@ mp_desc_init(mycpu) * is running. The machine array must show which CPUs exist. */ void -interrupt_stack_alloc() +interrupt_stack_alloc(void) { int i; int cpu_count; diff --git a/include/string.h b/include/string.h index c77d387..c31b429 100644 --- a/include/string.h +++ b/include/string.h @@ -32,7 +32,7 @@ extern void *memcpy (void *dest, const void *src, size_t n); extern void *memmove (void *dest, const void *src, size_t n); -extern int memcmp (const void *s1, const void *s2, size_t n); +extern int memcmp (const void *s1, const void *s2, size_t n) __attribute__ ((pure)); extern void *memset (void *s, int c, size_t n); @@ -46,11 +46,11 @@ extern char *strrchr (const char *s, int c); extern char *strsep (char **strp, const char *delim); -extern int strcmp (const char *s1, const char *s2); +extern int strcmp (const char *s1, const char *s2) __attribute__ ((pure)); -extern int strncmp (const char *s1, const char *s2, size_t n); +extern int strncmp (const char *s1, const char *s2, size_t n) __attribute__ ((pure)); -extern size_t strlen (const char *s); +extern size_t strlen (const char *s) __attribute__ ((pure)); extern char *strstr(const char *haystack, const char *needle); diff --git a/kern/bootstrap.c b/kern/bootstrap.c index 86e238a..3e24d7b 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -82,8 +82,8 @@ static mach_port_t boot_host_port; /* local name */ extern char *kernel_cmdline; -static void user_bootstrap(); /* forward */ -static void user_bootstrap_compat(); /* forward */ +static void user_bootstrap(void); /* forward */ +static void user_bootstrap_compat(void); /* forward */ static void bootstrap_exec_compat(void *exec_data); /* forward */ static void get_compat_strings(char *flags_str, char *root_str); /* forward */ diff --git a/kern/machine.c b/kern/machine.c index d5944ce..52133cb 100644 --- a/kern/machine.c +++ b/kern/machine.c @@ -361,7 +361,7 @@ processor_t processor; /* * action_thread() shuts down processors or changes their assignment. */ -void action_thread_continue() +void action_thread_continue(void) { processor_t processor; spl_t s; @@ -390,7 +390,7 @@ void action_thread_continue() } } -void __attribute__((noreturn)) action_thread() +void __attribute__((noreturn)) action_thread(void) { action_thread_continue(); /*NOTREACHED*/ diff --git a/kern/sched_prim.h b/kern/sched_prim.h index 50041e4..8c62b8b 100644 --- a/kern/sched_prim.h +++ b/kern/sched_prim.h @@ -69,7 +69,7 @@ extern void thread_sleep( event_t event, simple_lock_t lock, boolean_t interruptible); -extern void thread_wakeup(); /* for function pointers */ +extern void thread_wakeup(void); /* for function pointers */ extern void thread_wakeup_prim( event_t event, boolean_t one_thread, @@ -103,7 +103,7 @@ extern boolean_t thread_handoff( thread_t old_thread, continuation_t continuation, thread_t new_thread); -extern void recompute_priorities(); +extern void recompute_priorities(const void *param); extern void update_priority( thread_t thread); extern void compute_my_priority( diff --git a/kern/startup.c b/kern/startup.c index 81874e7..12f5123 100644 --- a/kern/startup.c +++ b/kern/startup.c @@ -155,7 +155,7 @@ void setup_main(void) * Kick off the time-out driven routines by calling * them the first time. */ - recompute_priorities(); + recompute_priorities(NULL); compute_mach_factor(); /* diff --git a/kern/strings.c b/kern/strings.c index 0752722..c77ae4f 100644 --- a/kern/strings.c +++ b/kern/strings.c @@ -53,7 +53,7 @@ * contents are identical upto the length of s1. */ -int +int __attribute__ ((pure)) strcmp( const char *s1, const char *s2) @@ -80,7 +80,7 @@ strcmp( * comparison runs for at most "n" characters. */ -int +int __attribute__ ((pure)) strncmp( const char *s1, const char *s2, @@ -161,7 +161,7 @@ strncpy( * the terminating null character. */ -size_t +size_t __attribute__ ((pure)) strlen( const char *string) { @@ -183,7 +183,7 @@ extern void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, #endif /* pmap_copy */ #ifndef pmap_attribute /* Get/Set special memory attributes. */ -extern kern_return_t pmap_attribute(); +extern kern_return_t pmap_attribute(void); #endif /* pmap_attribute */ /* diff --git a/vm/vm_resident.c b/vm/vm_resident.c index 6f34041..fa02cbc 100644 --- a/vm/vm_resident.c +++ b/vm/vm_resident.c @@ -918,7 +918,7 @@ vm_page_t vm_page_grab( return mem; } -vm_offset_t vm_page_grab_phys_addr() +vm_offset_t vm_page_grab_phys_addr(void) { vm_page_t p = vm_page_grab(FALSE); if (p == VM_PAGE_NULL) |