diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2001-06-15 22:45:35 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2001-06-15 22:45:35 +0000 |
commit | 2143edf026f512da5bb2b8f956083e2891cf1d0b (patch) | |
tree | 2a2f42e761002a44d9c5b9dbe785f9e86e3464d8 /sys | |
parent | f40f0e91c7020c78226642e2f36aa95cd6a93322 (diff) |
Compile kernel with -Wall, and fix a few issues for this to work.
ok hugh@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/vax/conf/Makefile.vax | 14 | ||||
-rw-r--r-- | sys/arch/vax/include/pmap.h | 3 | ||||
-rw-r--r-- | sys/arch/vax/qbus/dz.c | 8 | ||||
-rw-r--r-- | sys/arch/vax/vax/autoconf.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/vax/gencons.c | 3 | ||||
-rw-r--r-- | sys/arch/vax/vax/machdep.c | 9 | ||||
-rw-r--r-- | sys/arch/vax/vax/rootfil.c | 7 | ||||
-rw-r--r-- | sys/arch/vax/vax/subr.s | 3 | ||||
-rw-r--r-- | sys/arch/vax/vsa/dz_ibus.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/vsa/smg.c | 16 |
10 files changed, 33 insertions, 40 deletions
diff --git a/sys/arch/vax/conf/Makefile.vax b/sys/arch/vax/conf/Makefile.vax index e66b1728bff..ba6e9d33de2 100644 --- a/sys/arch/vax/conf/Makefile.vax +++ b/sys/arch/vax/conf/Makefile.vax @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.vax,v 1.13 2000/04/27 05:47:15 bjc Exp $ +# $OpenBSD: Makefile.vax,v 1.14 2001/06/15 22:45:27 miod Exp $ # $NetBSD: Makefile.vax,v 1.49 1999/07/26 05:20:49 cgd Exp $ # Makefile for OpenBSD/vax @@ -22,8 +22,6 @@ # DEBUG is set to -g if debugging. # PROF is set to -pg if profiling. - - %OBJS %CFILES @@ -74,19 +72,11 @@ S!= cd ../../../..; pwd .endif VAX= $S/arch/vax -HAVE_GCC28!= ${CC} --version | egrep "^(2\.8|egcs)" ; echo INCLUDES= -I. -I$S/arch -I$S -nostdinc CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \ -D_VAX_INLINE_ -CWARNFLAGS?= -Werror - -.if (${HAVE_GCC28} != "") -CWARNFLAGS+= -Wno-main -.endif +CWARNFLAGS?= -Werror -Wall -Wno-main -Wno-format CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} -.if (${HAVE_GCC28} != "") -CFLAGS+= -mno-pic -.endif AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE LINKFLAGS= -N -Ttext 80000000 -e start STRIPFLAGS= -d diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h index c1d9ea00686..c013ce1a84d 100644 --- a/sys/arch/vax/include/pmap.h +++ b/sys/arch/vax/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.10 2001/05/16 17:29:40 hugh Exp $ */ +/* $OpenBSD: pmap.h,v 1.11 2001/06/15 22:45:33 miod Exp $ */ /* $NetBSD: pmap.h,v 1.37 1999/08/01 13:48:07 ragge Exp $ */ /* @@ -145,6 +145,7 @@ extern struct pmap kernel_pmap_store; void pmap_bootstrap __P((void)); vaddr_t pmap_map __P((vm_offset_t, vm_offset_t, vm_offset_t, int)); void pmap_pinit __P((pmap_t)); +void pmap_activate __P((struct proc *)); #endif /* _KERNEL */ diff --git a/sys/arch/vax/qbus/dz.c b/sys/arch/vax/qbus/dz.c index ac03501edf2..040747e9a6e 100644 --- a/sys/arch/vax/qbus/dz.c +++ b/sys/arch/vax/qbus/dz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dz.c,v 1.3 2001/05/16 22:15:18 hugh Exp $ */ +/* $OpenBSD: dz.c,v 1.4 2001/06/15 22:45:33 miod Exp $ */ /* $NetBSD: dz.c,v 1.19 2000/01/24 02:40:29 matt Exp $ */ /* * Copyright (c) 1996 Ken C. Wellsch. All rights reserved. @@ -477,9 +477,15 @@ int dzstop(tp, flag) register struct tty *tp; { + int s; + + s = spltty(); if (tp->t_state & TS_BUSY) if (!(tp->t_state & TS_TTSTOP)) tp->t_state |= TS_FLUSH; + splx(s); + + return 0; } void diff --git a/sys/arch/vax/vax/autoconf.c b/sys/arch/vax/vax/autoconf.c index ce7939b5300..1bf3fc4d7b4 100644 --- a/sys/arch/vax/vax/autoconf.c +++ b/sys/arch/vax/vax/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.12 2001/05/05 22:34:28 art Exp $ */ +/* $OpenBSD: autoconf.c,v 1.13 2001/06/15 22:45:33 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.45 1999/10/23 14:56:05 ragge Exp $ */ /* @@ -59,7 +59,9 @@ #include <vax/bi/bireg.h> +void cpu_dumpconf __P((void)); /* machdep.c */ void gencnslask __P((void)); +void setroot __P((void)); /* rootfil.c */ struct cpu_dep *dep_call; int mastercpu; /* chief of the system */ @@ -72,8 +74,6 @@ extern int cold; /* cold-start flag */ void cpu_configure() { - extern int boothowto; - if (config_rootfound("mainbus", NULL) == NULL) panic("mainbus not configured"); diff --git a/sys/arch/vax/vax/gencons.c b/sys/arch/vax/vax/gencons.c index fb03653385f..2aacbabe813 100644 --- a/sys/arch/vax/vax/gencons.c +++ b/sys/arch/vax/vax/gencons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gencons.c,v 1.10 2001/03/12 11:45:38 hugh Exp $ */ +/* $OpenBSD: gencons.c,v 1.11 2001/06/15 22:45:33 miod Exp $ */ /* $NetBSD: gencons.c,v 1.22 2000/01/24 02:40:33 matt Exp $ */ /* @@ -240,6 +240,7 @@ gencnstop(tp, flag) struct tty *tp; int flag; { + return 0; } void diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index 6786e79c544..794a7d3961f 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.33 2001/06/11 01:33:48 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.34 2001/06/15 22:45:33 miod Exp $ */ /* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */ /* @@ -340,12 +340,7 @@ consinit() #endif cninit(); #ifdef DDB - { - extern int end; /* Contains pointer to symsize also */ - extern int *esym; - - ddb_init(); - } + ddb_init(); #ifdef DEBUG if (sizeof(struct user) > REDZONEADDR) panic("struct user inside red zone"); diff --git a/sys/arch/vax/vax/rootfil.c b/sys/arch/vax/vax/rootfil.c index cce8d0ed145..639d302c258 100644 --- a/sys/arch/vax/vax/rootfil.c +++ b/sys/arch/vax/vax/rootfil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rootfil.c,v 1.10 2001/04/09 00:59:30 hugh Exp $ */ +/* $OpenBSD: rootfil.c,v 1.11 2001/06/15 22:45:33 miod Exp $ */ /* $NetBSD: rootfil.c,v 1.14 1996/10/13 03:35:58 christos Exp $ */ /* @@ -82,11 +82,8 @@ void setroot() { int majdev, mindev, unit, part, controller, adaptor; - dev_t temp = 0, orootdev; - struct ngcconf *nc; - extern struct ngcconf ngcconf[]; + dev_t orootdev; extern int boothowto; - char name[128]; char *uname; if ((bootdev & B_MAGICMASK) != (u_long)B_DEVMAGIC) { diff --git a/sys/arch/vax/vax/subr.s b/sys/arch/vax/vax/subr.s index cfb73bb404c..e1cef336322 100644 --- a/sys/arch/vax/vax/subr.s +++ b/sys/arch/vax/vax/subr.s @@ -1,4 +1,4 @@ -/* $OpenBSD: subr.s,v 1.13 2001/05/16 22:15:18 hugh Exp $ */ +/* $OpenBSD: subr.s,v 1.14 2001/06/15 22:45:34 miod Exp $ */ /* $NetBSD: subr.s,v 1.32 1999/03/25 00:41:48 mrg Exp $ */ /* @@ -472,7 +472,6 @@ ENTRY(suswintr,0) movl r1,r0 ret -ALTENTRY(fusword) ENTRY(fuswintr,0) movab 1f,*pcbtrap movl 4(ap),r0 diff --git a/sys/arch/vax/vsa/dz_ibus.c b/sys/arch/vax/vsa/dz_ibus.c index 510ce2c3a03..0be9c27a6d7 100644 --- a/sys/arch/vax/vsa/dz_ibus.c +++ b/sys/arch/vax/vsa/dz_ibus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dz_ibus.c,v 1.5 2001/05/16 22:15:19 hugh Exp $ */ +/* $OpenBSD: dz_ibus.c,v 1.6 2001/06/15 22:45:34 miod Exp $ */ /* $NetBSD: dz_ibus.c,v 1.15 1999/08/27 17:50:42 ragge Exp $ */ /* * Copyright (c) 1998 Ludd, University of Lule}, Sweden. @@ -87,6 +87,8 @@ static volatile struct ss_dz {/* base address of DZ-controller: 0x200A0000 */ cons_decl(dz); cdev_decl(dz); +extern int getmajor __P((void *)); /* conf.c */ + #if NDZKBD > 0 || NDZMS > 0 static int dz_print(void *aux, const char *name) diff --git a/sys/arch/vax/vsa/smg.c b/sys/arch/vax/vsa/smg.c index 2b1ea710842..29c534470a8 100644 --- a/sys/arch/vax/vsa/smg.c +++ b/sys/arch/vax/vsa/smg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smg.c,v 1.3 2001/05/16 22:15:19 hugh Exp $ */ +/* $OpenBSD: smg.c,v 1.4 2001/06/15 22:45:34 miod Exp $ */ /* $NetBSD: smg.c,v 1.21 2000/03/23 06:46:44 thorpej Exp $ */ /* * Copyright (c) 1998 Ludd, University of Lule}, Sweden. @@ -198,6 +198,8 @@ struct smg_screen { static struct smg_screen smg_conscreen; static struct smg_screen *curscr; +extern int getmajor __P((void *)); /* conf.c */ + int smg_match(struct device *parent, struct cfdata *match, void *aux) { @@ -427,14 +429,14 @@ setcursor(struct wsdisplay_cursor *v) } if (v->which & WSDISPLAY_CURSOR_DOCMAP) { /* First background */ - red = fusword(v->cmap.red); - green = fusword(v->cmap.green); - blue = fusword(v->cmap.blue); + red = fuswintr(v->cmap.red); + green = fuswintr(v->cmap.green); + blue = fuswintr(v->cmap.blue); bgmask = (((30L * red + 59L * green + 11L * blue) >> 8) >= (((1<<8)-1)*50)) ? ~0 : 0; - red = fusword(v->cmap.red+2); - green = fusword(v->cmap.green+2); - blue = fusword(v->cmap.blue+2); + red = fuswintr(v->cmap.red+2); + green = fuswintr(v->cmap.green+2); + blue = fuswintr(v->cmap.blue+2); fgmask = (((30L * red + 59L * green + 11L * blue) >> 8) >= (((1<<8)-1)*50)) ? ~0 : 0; } |