From 1dfc2c167f0c0ee95c98088b2c05b50350b97ddb Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 28 Sep 2002 17:15:38 +0000 Subject: Be consistent about "static" functions: if the function is marked static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512 --- sys/kern/kern_intr.c | 2 +- sys/kern/kern_sig.c | 2 +- sys/kern/kern_sysctl.c | 2 +- sys/kern/link_elf.c | 4 ++-- sys/kern/link_elf_obj.c | 4 ++-- sys/kern/subr_diskmbr.c | 2 +- sys/kern/subr_mbuf.c | 2 +- sys/kern/subr_witness.c | 2 +- sys/kern/sys_generic.c | 2 +- sys/kern/sys_pipe.c | 4 ++-- sys/kern/vfs_bio.c | 2 +- sys/kern/vfs_subr.c | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) (limited to 'sys/kern') diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index ba270ab..61f6579 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -468,7 +468,7 @@ swi_sched(void *cookie, int flags) /* * This is the main code for interrupt threads. */ -void +static void ithread_loop(void *arg) { struct ithd *ithd; /* our thread context */ diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 0b134b1..aed5717 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1018,7 +1018,7 @@ done2: * Common code for kill process group/broadcast kill. * cp is calling process. */ -int +static int killpg1(td, sig, pgid, all) register struct thread *td; int sig, pgid, all; diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 57c6be8..cf84cd8 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1091,7 +1091,7 @@ sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid, * to, and return the resulting error code. */ -int +static int sysctl_root(SYSCTL_HANDLER_ARGS) { struct sysctl_oid *oid; diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index ea4f0dd..83fbe17 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -154,7 +154,7 @@ struct r_debug r_debug; /* * Function for the debugger to set a breakpoint on to gain control. */ -void +static void r_debug_state(struct r_debug *dummy_one __unused, struct link_map *dummy_two __unused) { @@ -975,7 +975,7 @@ elf_hash(const char *name) return h; } -int +static int link_elf_lookup_symbol(linker_file_t lf, const char* name, c_linker_sym_t* sym) { elf_file_t ef = (elf_file_t) lf; diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index ea4f0dd..83fbe17 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -154,7 +154,7 @@ struct r_debug r_debug; /* * Function for the debugger to set a breakpoint on to gain control. */ -void +static void r_debug_state(struct r_debug *dummy_one __unused, struct link_map *dummy_two __unused) { @@ -975,7 +975,7 @@ elf_hash(const char *name) return h; } -int +static int link_elf_lookup_symbol(linker_file_t lf, const char* name, c_linker_sym_t* sym) { elf_file_t ef = (elf_file_t) lf; diff --git a/sys/kern/subr_diskmbr.c b/sys/kern/subr_diskmbr.c index 2154f30..3457c01 100644 --- a/sys/kern/subr_diskmbr.c +++ b/sys/kern/subr_diskmbr.c @@ -376,7 +376,7 @@ done: return (error); } -void +static void mbr_extended(dev, lp, ssp, ext_offset, ext_size, base_ext_offset, nsectors, ntracks, mbr_offset, level) dev_t dev; diff --git a/sys/kern/subr_mbuf.c b/sys/kern/subr_mbuf.c index d066fe3..b8dc867 100644 --- a/sys/kern/subr_mbuf.c +++ b/sys/kern/subr_mbuf.c @@ -332,7 +332,7 @@ static void mbuf_init(void *); */ MALLOC_DEFINE(M_MBUF, "mbufmgr", "mbuf subsystem management structures"); SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL) -void +static void mbuf_init(void *dummy) { struct mb_pcpu_list *pcpu_cnt; diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 3df0a35..b6cd92a 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -1117,7 +1117,7 @@ isitmydescendant(struct witness *parent, struct witness *child) return (0); } -void +static void witness_levelall (void) { struct witness_list *list; diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 5d84154..b74a74b 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -149,7 +149,7 @@ pread(td, uap) /* * Code common for read and pread */ -int +static int dofileread(td, fp, fd, buf, nbyte, offset, flags) struct thread *td; struct file *fp; diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 17e3bc3..d87eb44 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1154,7 +1154,7 @@ pipe_write(fp, uio, active_cred, flags, td) /* * we implement a very minimal set of ioctls for compatibility with sockets. */ -int +static int pipe_ioctl(fp, cmd, data, active_cred, td) struct file *fp; u_long cmd; @@ -1216,7 +1216,7 @@ pipe_ioctl(fp, cmd, data, active_cred, td) return (ENOTTY); } -int +static int pipe_poll(fp, events, active_cred, td) struct file *fp; int events; diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index e05263d..46d136c 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3455,7 +3455,7 @@ tryagain: } /* Return pages associated with this buf to the vm system */ -void +static void vm_hold_free_pages(struct buf * bp, vm_offset_t from, vm_offset_t to) { vm_offset_t pg; diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index e0b1c4e..56ca7be 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1654,7 +1654,7 @@ SYSINIT(syncer, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start, &up_kp) /* * System filesystem synchronizer daemon. */ -void +static void sched_sync(void) { struct synclist *slp; -- cgit v1.1