From f9fc827448679cf1d41e56512c34521bf06ce37a Mon Sep 17 00:00:00 2001 From: wollman Date: Thu, 18 Aug 1994 22:36:09 +0000 Subject: Fix up some sloppy coding practices: - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter. --- sys/amd64/amd64/machdep.c | 5 ++--- sys/amd64/amd64/pmap.c | 6 +----- sys/amd64/amd64/trap.c | 4 +--- sys/amd64/amd64/tsc.c | 4 +--- sys/amd64/include/cpufunc.h | 3 ++- sys/amd64/include/pmap.h | 16 +--------------- sys/amd64/isa/clock.c | 4 +--- 7 files changed, 9 insertions(+), 33 deletions(-) (limited to 'sys/amd64') diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index b5616e5..54c2a58 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.51 1994/08/13 03:49:42 wollman Exp $ + * $Id: machdep.c,v 1.52 1994/08/13 14:21:42 davidg Exp $ */ #include "npx.h" @@ -95,7 +95,6 @@ static void identifycpu(void); static void initcpu(void); static int test_page(int *, int); -extern int grow(struct proc *,u_int); char machine[] = "i386"; char cpu_model[sizeof("Pentium") + 1]; @@ -1073,7 +1072,7 @@ void init386(first) int first; { - extern ssdtosd(), lgdt(), lidt(), lldt(), etext; + extern lgdt(), lidt(), lldt(), etext; int x, *pi; unsigned biosbasemem, biosextmem; struct gate_descriptor *gdp; diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 2a1011f..70fa5ff 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $Id: pmap.c,v 1.31 1994/08/07 14:53:10 davidg Exp $ + * $Id: pmap.c,v 1.32 1994/08/13 03:49:44 wollman Exp $ */ /* @@ -153,7 +153,6 @@ static inline pv_entry_t get_pv_entry(); static inline void pmap_use_pt(); static inline void pmap_unuse_pt(); -inline pt_entry_t * pmap_pte(); extern vm_offset_t clean_sva, clean_eva; extern int cpu_class; @@ -338,7 +337,6 @@ pmap_bootstrap(firstaddr, loadaddr) vm_offset_t va; pt_entry_t *pte; #endif - extern int IdlePTD; avail_start = firstaddr + DMAPAGES*NBPG; @@ -414,7 +412,6 @@ pmap_init(phys_start, phys_end) int rv; int i; extern int KPTphys; - extern int IdlePTD; /* * Now that kernel map has been allocated, we can mark as @@ -1465,7 +1462,6 @@ pmap_object_init_pt(pmap, addr, object, offset, size) int s; vm_offset_t v, lastv=0; pt_entry_t pte; - extern vm_map_t kernel_map; vm_offset_t objbytes; int anyvalid = 0; diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 21cdac6..58c0090 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.27 1994/08/01 11:25:28 davidg Exp $ + * $Id: trap.c,v 1.28 1994/08/10 04:39:47 wollman Exp $ */ /* @@ -73,8 +73,6 @@ int trap_pfault __P((struct trapframe *, int)); void trap_fatal __P((struct trapframe *)); -extern int grow(struct proc *,u_int); - struct sysent sysent[]; int nsysent; diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index e3f3f21..e72d6a3 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.14 1994/08/15 03:15:18 wollman Exp $ + * $Id: clock.c,v 1.15 1994/08/18 05:09:21 davidg Exp $ */ /* @@ -59,8 +59,6 @@ #endif #define TIMER_DIV(x) ((TIMER_FREQ+(x)/2)/(x)) -void hardclock(); -void statclock(); static int beeping; int timer0_divisor = TIMER_DIV(100); /* XXX should be hz */ u_int timer0_prescale; diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 77f9213..8c99782 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cpufunc.h,v 1.15 1994/08/11 02:26:08 jkh Exp $ + * $Id: cpufunc.h,v 1.16 1994/08/13 03:49:49 wollman Exp $ */ /* @@ -153,6 +153,7 @@ void load_cr0 __P((u_int cr0)); u_int rcr0 __P((void)); void load_cr3(u_long); u_long rcr3(void); +extern void DELAY(int); void setidt __P((int, void (*)(), int, int)); extern u_long kvtop(void *); diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 7ddcebd..1e4cf2b 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -42,7 +42,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $Id: pmap.h,v 1.12 1994/03/24 23:12:48 davidg Exp $ + * $Id: pmap.h,v 1.14 1994/05/25 08:56:24 rgrimes Exp $ */ #ifndef _PMAP_MACHINE_ @@ -194,23 +194,9 @@ pv_entry_t pv_table; /* array of entries, one per page */ #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) -extern pmap_t pmap_create(vm_size_t); -extern void pmap_pinit(struct pmap *); -extern void pmap_destroy(pmap_t); -extern void pmap_release(struct pmap *); -extern void pmap_reference(pmap_t); -extern void pmap_remove(struct pmap *, vm_offset_t, vm_offset_t); -extern void pmap_protect(struct pmap *, vm_offset_t, vm_offset_t, vm_prot_t); -extern void pmap_enter(pmap_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t); -extern void pmap_change_wiring(pmap_t, vm_offset_t, boolean_t); extern inline pt_entry_t *pmap_pte(pmap_t, vm_offset_t); -extern vm_offset_t pmap_extract(pmap_t, vm_offset_t); -extern void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t); -extern void pmap_collect(pmap_t); struct pcb; extern void pmap_activate(pmap_t, struct pcb *); extern pmap_t pmap_kernel(void); -extern void pmap_pageable(pmap_t, vm_offset_t, vm_offset_t, boolean_t); - #endif /* KERNEL */ diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index e3f3f21..e72d6a3 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.14 1994/08/15 03:15:18 wollman Exp $ + * $Id: clock.c,v 1.15 1994/08/18 05:09:21 davidg Exp $ */ /* @@ -59,8 +59,6 @@ #endif #define TIMER_DIV(x) ((TIMER_FREQ+(x)/2)/(x)) -void hardclock(); -void statclock(); static int beeping; int timer0_divisor = TIMER_DIV(100); /* XXX should be hz */ u_int timer0_prescale; -- cgit v1.1