diff --git a/bin/chflags/Makefile b/bin/chflags/Makefile index d269255b6c65..d05ff81f8a1f 100644 --- a/bin/chflags/Makefile +++ b/bin/chflags/Makefile @@ -3,6 +3,7 @@ NOSHARED?=yes PROG= chflags +CFLAGS+=-Wall SRCS= chflags.c stat_flags.c .PATH: ${.CURDIR}/../../bin/ls diff --git a/bin/chflags/chflags.c b/bin/chflags/chflags.c index f33f46eeccf3..664609417ef5 100644 --- a/bin/chflags/chflags.c +++ b/bin/chflags/chflags.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1992, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)chflags.c 8.5 (Berkeley) 4/1/94"; +static const char sccsid[] = "@(#)chflags.c 8.5 (Berkeley) 4/1/94"; #endif /* not lint */ #include diff --git a/usr.bin/apply/Makefile b/usr.bin/apply/Makefile index 59f358ed5292..05823eaaa301 100644 --- a/usr.bin/apply/Makefile +++ b/usr.bin/apply/Makefile @@ -1,5 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= apply +CFLAGS+=-Wall .include diff --git a/usr.bin/apply/apply.c b/usr.bin/apply/apply.c index 37a77b7d05c9..3f0727d372c0 100644 --- a/usr.bin/apply/apply.c +++ b/usr.bin/apply/apply.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)apply.c 8.4 (Berkeley) 4/4/94"; +static const char sccsid[] = "@(#)apply.c 8.4 (Berkeley) 4/4/94"; #endif /* not lint */ #include diff --git a/usr.bin/banner/Makefile b/usr.bin/banner/Makefile index 54a3ad5cb20b..c04e68ae64b2 100644 --- a/usr.bin/banner/Makefile +++ b/usr.bin/banner/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= banner +CFLAGS+=-Wall MAN6= banner.6 .include diff --git a/usr.bin/banner/banner.c b/usr.bin/banner/banner.c index 13a28497489d..15a2952ed1f4 100644 --- a/usr.bin/banner/banner.c +++ b/usr.bin/banner/banner.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1980, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)banner.c 8.4 (Berkeley) 4/29/95"; +static const char sccsid[] = "@(#)banner.c 8.4 (Berkeley) 4/29/95"; #endif /* not lint */ /* diff --git a/usr.bin/basename/Makefile b/usr.bin/basename/Makefile index 21354bd3a113..d74d67007e38 100644 --- a/usr.bin/basename/Makefile +++ b/usr.bin/basename/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= basename +CFLAGS+=-Wall MLINKS= basename.1 dirname.1 .include diff --git a/usr.bin/basename/basename.c b/usr.bin/basename/basename.c index 596401311759..1a6aa485be05 100644 --- a/usr.bin/basename/basename.c +++ b/usr.bin/basename/basename.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1991, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)basename.c 8.4 (Berkeley) 5/4/95"; +static const char sccsid[] = "@(#)basename.c 8.4 (Berkeley) 5/4/95"; #endif /* not lint */ #include diff --git a/usr.bin/biff/Makefile b/usr.bin/biff/Makefile index 81cb86bc6afa..db26fc47fbba 100644 --- a/usr.bin/biff/Makefile +++ b/usr.bin/biff/Makefile @@ -1,5 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= biff +CFLAGS+=-Wall .include diff --git a/usr.bin/biff/biff.c b/usr.bin/biff/biff.c index 52f5229ff1a8..185d6349167e 100644 --- a/usr.bin/biff/biff.c +++ b/usr.bin/biff/biff.c @@ -30,17 +30,17 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: biff.c,v 1.3 1997/06/23 06:45:38 charnier Exp $ + * $Id: biff.c,v 1.4 1997/12/29 00:08:50 alex Exp $ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1980, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)biff.c 8.1 (Berkeley) 6/6/93"; +static const char sccsid[] = "@(#)biff.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #include diff --git a/usr.bin/brandelf/Makefile b/usr.bin/brandelf/Makefile index 3561ec00cf75..81d0039e47df 100644 --- a/usr.bin/brandelf/Makefile +++ b/usr.bin/brandelf/Makefile @@ -1,3 +1,4 @@ PROG= brandelf +CFLAGS+=-Wall .include diff --git a/usr.bin/cap_mkdb/Makefile b/usr.bin/cap_mkdb/Makefile index 0e403afc409f..88a34d7dae45 100644 --- a/usr.bin/cap_mkdb/Makefile +++ b/usr.bin/cap_mkdb/Makefile @@ -1,5 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= cap_mkdb +CFLAGS+=-Wall .include diff --git a/usr.bin/cap_mkdb/cap_mkdb.c b/usr.bin/cap_mkdb/cap_mkdb.c index 91c222228456..f28d8db0805d 100644 --- a/usr.bin/cap_mkdb/cap_mkdb.c +++ b/usr.bin/cap_mkdb/cap_mkdb.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1992, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)cap_mkdb.c 8.1 (Berkeley) 6/6/93"; +static const char sccsid[] = "@(#)cap_mkdb.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #include diff --git a/usr.bin/chat/Makefile b/usr.bin/chat/Makefile index ab4129e05048..1154024e846f 100644 --- a/usr.bin/chat/Makefile +++ b/usr.bin/chat/Makefile @@ -1,6 +1,7 @@ -# $Id: Makefile,v 1.4 1997/02/22 19:54:21 peter Exp $ +# $Id: Makefile,v 1.5 1997/08/22 15:42:31 peter Exp $ PROG= chat +CFLAGS+=-Wall SRCS= chat.c MAN8= chat.8 diff --git a/usr.bin/chat/chat.c b/usr.bin/chat/chat.c index f3676aa02799..c25b8cfd8775 100644 --- a/usr.bin/chat/chat.c +++ b/usr.bin/chat/chat.c @@ -78,7 +78,8 @@ */ #ifndef lint -static char rcsid[] = "$Id: chat.c,v 1.11 1998/03/21 20:47:04 peter Exp $"; +static const char rcsid[] = + "$Id: chat.c,v 1.12 1998/06/23 21:58:41 peter Exp $"; #endif #include diff --git a/usr.bin/checknr/Makefile b/usr.bin/checknr/Makefile index c26524876bd4..85e4c48e827d 100644 --- a/usr.bin/checknr/Makefile +++ b/usr.bin/checknr/Makefile @@ -1,5 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= checknr +CFLAGS+=-Wall .include diff --git a/usr.bin/checknr/checknr.c b/usr.bin/checknr/checknr.c index f8531cc7da13..743ed04e24c5 100644 --- a/usr.bin/checknr/checknr.c +++ b/usr.bin/checknr/checknr.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1980, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)checknr.c 8.1 (Berkeley) 6/6/93"; +static const char sccsid[] = "@(#)checknr.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ /* diff --git a/usr.bin/chflags/Makefile b/usr.bin/chflags/Makefile index d269255b6c65..d05ff81f8a1f 100644 --- a/usr.bin/chflags/Makefile +++ b/usr.bin/chflags/Makefile @@ -3,6 +3,7 @@ NOSHARED?=yes PROG= chflags +CFLAGS+=-Wall SRCS= chflags.c stat_flags.c .PATH: ${.CURDIR}/../../bin/ls diff --git a/usr.bin/chflags/chflags.c b/usr.bin/chflags/chflags.c index f33f46eeccf3..664609417ef5 100644 --- a/usr.bin/chflags/chflags.c +++ b/usr.bin/chflags/chflags.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1992, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)chflags.c 8.5 (Berkeley) 4/1/94"; +static const char sccsid[] = "@(#)chflags.c 8.5 (Berkeley) 4/1/94"; #endif /* not lint */ #include diff --git a/usr.bin/chpass/Makefile b/usr.bin/chpass/Makefile index f19a25730d1f..3abed829d3ac 100644 --- a/usr.bin/chpass/Makefile +++ b/usr.bin/chpass/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 4/2/94 PROG= chpass +CFLAGS+=-Wall SRCS= chpass.c edit.c field.c pw_copy.c pw_scan.c pw_util.c pw_yp.c \ table.c util.c ypxfr_misc.c ${GENSRCS} GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c yppasswd_private.h \ diff --git a/usr.bin/chpass/chpass.c b/usr.bin/chpass/chpass.c index 982548fa5a46..2809f8bef74f 100644 --- a/usr.bin/chpass/chpass.c +++ b/usr.bin/chpass/chpass.c @@ -32,15 +32,15 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1988, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "From: @(#)chpass.c 8.4 (Berkeley) 4/2/94"; -static char rcsid[] = - "$Id: chpass.c,v 1.13 1997/02/22 19:54:25 peter Exp $"; +static const char sccsid[] = "From: @(#)chpass.c 8.4 (Berkeley) 4/2/94"; +static const char rcsid[] = + "$Id: chpass.c,v 1.14 1997/03/29 04:28:38 imp Exp $"; #endif /* not lint */ #include @@ -83,10 +83,10 @@ main(argc, argv) char **argv; { enum { NEWSH, LOADENTRY, EDITENTRY, NEWPW, NEWEXP } op; - struct passwd *pw, lpw; + struct passwd *pw = NULL, lpw; char *username = NULL; int ch, pfd, tfd; - char *arg; + char *arg = NULL; #ifdef YP int force_local = 0; int force_yp = 0; diff --git a/usr.bin/chpass/edit.c b/usr.bin/chpass/edit.c index 68dbc0ea50e3..9cae42e753fc 100644 --- a/usr.bin/chpass/edit.c +++ b/usr.bin/chpass/edit.c @@ -30,11 +30,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: edit.c,v 1.10 1997/06/25 06:59:55 charnier Exp $ + * $Id: edit.c,v 1.11 1998/08/14 03:18:32 thepish Exp $ */ #ifndef lint -static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/chpass/field.c b/usr.bin/chpass/field.c index 73fa4795a2e0..997d21feed30 100644 --- a/usr.bin/chpass/field.c +++ b/usr.bin/chpass/field.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)field.c 8.4 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)field.c 8.4 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/chpass/table.c b/usr.bin/chpass/table.c index eed097eebad8..1bc857b87ca8 100644 --- a/usr.bin/chpass/table.c +++ b/usr.bin/chpass/table.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)table.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)table.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/cksum/Makefile b/usr.bin/cksum/Makefile index f4fa373c41b1..4c1d027c04b0 100644 --- a/usr.bin/cksum/Makefile +++ b/usr.bin/cksum/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 4/28/95 PROG= cksum +CFLAGS+=-Wall SRCS= cksum.c crc.c print.c sum1.c sum2.c crc32.c LINKS= ${BINDIR}/cksum ${BINDIR}/sum MLINKS= cksum.1 sum.1 diff --git a/usr.bin/cksum/crc.c b/usr.bin/cksum/crc.c index 352639531c96..0dde11d64b0a 100644 --- a/usr.bin/cksum/crc.c +++ b/usr.bin/cksum/crc.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93"; +static const char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93"; #endif /* not lint */ #include diff --git a/usr.bin/cksum/print.c b/usr.bin/cksum/print.c index 48c38aa9a214..b3a92d39a24f 100644 --- a/usr.bin/cksum/print.c +++ b/usr.bin/cksum/print.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 6/6/93"; +static const char sccsid[] = "@(#)print.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #include diff --git a/usr.bin/cksum/sum1.c b/usr.bin/cksum/sum1.c index 1975ee27fd9d..a46a575b323f 100644 --- a/usr.bin/cksum/sum1.c +++ b/usr.bin/cksum/sum1.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)sum1.c 8.1 (Berkeley) 6/6/93"; +static const char sccsid[] = "@(#)sum1.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #include diff --git a/usr.bin/cksum/sum2.c b/usr.bin/cksum/sum2.c index 792205044c50..11abb2c84095 100644 --- a/usr.bin/cksum/sum2.c +++ b/usr.bin/cksum/sum2.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)sum2.c 8.1 (Berkeley) 6/6/93"; +static const char sccsid[] = "@(#)sum2.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #include diff --git a/usr.bin/cmp/Makefile b/usr.bin/cmp/Makefile index 1b84ce31b492..1ff3af6e6262 100644 --- a/usr.bin/cmp/Makefile +++ b/usr.bin/cmp/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= cmp +CFLAGS+=-Wall SRCS= cmp.c misc.c regular.c special.c .include diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index da269d844a95..a4f4d8860563 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1987, 1990, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)cmp.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)cmp.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/cmp/misc.c b/usr.bin/cmp/misc.c index d5a601daf01a..248ef93f0b74 100644 --- a/usr.bin/cmp/misc.c +++ b/usr.bin/cmp/misc.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)misc.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)misc.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c index f540ab4aebe8..3b82bae11a69 100644 --- a/usr.bin/cmp/regular.c +++ b/usr.bin/cmp/regular.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)regular.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)regular.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/cmp/special.c b/usr.bin/cmp/special.c index 0a15fa1b28f4..b843cc8fc9cc 100644 --- a/usr.bin/cmp/special.c +++ b/usr.bin/cmp/special.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)special.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)special.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/col/Makefile b/usr.bin/col/Makefile index efa0933830a2..9edab17f7698 100644 --- a/usr.bin/col/Makefile +++ b/usr.bin/col/Makefile @@ -1,5 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= col +CFLAGS+=-Wall .include diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c index 88d024e72177..8d26faadc0a0 100644 --- a/usr.bin/col/col.c +++ b/usr.bin/col/col.c @@ -35,13 +35,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1990, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)col.c 8.5 (Berkeley) 5/4/95"; +static const char sccsid[] = "@(#)col.c 8.5 (Berkeley) 5/4/95"; #endif /* not lint */ #include diff --git a/usr.bin/colcrt/Makefile b/usr.bin/colcrt/Makefile index e03ab0ca8a9f..9bb24b735b8f 100644 --- a/usr.bin/colcrt/Makefile +++ b/usr.bin/colcrt/Makefile @@ -1,5 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= colcrt +CFLAGS+=-Wall .include diff --git a/usr.bin/colcrt/colcrt.c b/usr.bin/colcrt/colcrt.c index 40fe5cef49b2..e6dc44543580 100644 --- a/usr.bin/colcrt/colcrt.c +++ b/usr.bin/colcrt/colcrt.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1980, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)colcrt.c 8.1 (Berkeley) 6/6/93"; +static const char sccsid[] = "@(#)colcrt.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #include diff --git a/usr.bin/colldef/Makefile b/usr.bin/colldef/Makefile index 474bf7bd4da3..ccb5e98f452e 100644 --- a/usr.bin/colldef/Makefile +++ b/usr.bin/colldef/Makefile @@ -1,7 +1,8 @@ -# $Id: Makefile,v 1.12 1998/05/04 20:09:02 bde Exp $ +# $Id: Makefile,v 1.13 1998/05/05 13:16:22 bde Exp $ PROG = colldef LFLAGS = -8 -i +CFLAGS += -Wall CFLAGS += -I. -I${.CURDIR}/../../lib/libc/locale -DCOLLATE_DEBUG SRCS = parse.y scan.l y.tab.h LDADD = -ll diff --git a/usr.bin/colldef/parse.y b/usr.bin/colldef/parse.y index e316e1c89928..cfc5642118f7 100644 --- a/usr.bin/colldef/parse.y +++ b/usr.bin/colldef/parse.y @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: parse.y,v 1.9 1997/06/26 11:25:17 charnier Exp $ + * $Id: parse.y,v 1.10 1997/06/30 11:24:18 charnier Exp $ */ #include @@ -40,6 +40,8 @@ extern int line_no; extern FILE *yyin; void yyerror(char *fmt, ...); +int yyparse(void); +int yylex(void); static void usage __P((void)); char map_name[FILENAME_MAX] = "."; @@ -208,6 +210,7 @@ sec_sub_item : CHAR { } ; %% +int main(ac, av) char **av; { @@ -268,6 +271,7 @@ void yyerror(char *fmt, ...) } #ifdef COLLATE_DEBUG +void collate_print_tables() { int i; diff --git a/usr.bin/colrm/Makefile b/usr.bin/colrm/Makefile index b9c8341100a6..7413d42562eb 100644 --- a/usr.bin/colrm/Makefile +++ b/usr.bin/colrm/Makefile @@ -1,5 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= colrm +CFLAGS+=-Wall .include diff --git a/usr.bin/colrm/colrm.c b/usr.bin/colrm/colrm.c index 1195300a8d29..2c9e0e496e6e 100644 --- a/usr.bin/colrm/colrm.c +++ b/usr.bin/colrm/colrm.c @@ -30,17 +30,17 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: colrm.c,v 1.4 1997/06/30 11:05:42 charnier Exp $ + * $Id: colrm.c,v 1.5 1997/12/29 00:08:59 alex Exp $ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1991, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)colrm.c 8.2 (Berkeley) 5/4/95"; +static const char sccsid[] = "@(#)colrm.c 8.2 (Berkeley) 5/4/95"; #endif /* not lint */ #include diff --git a/usr.bin/column/Makefile b/usr.bin/column/Makefile index 1c304e2b3927..33de9f61fe7e 100644 --- a/usr.bin/column/Makefile +++ b/usr.bin/column/Makefile @@ -1,5 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= column +CFLAGS+=-Wall .include diff --git a/usr.bin/column/column.c b/usr.bin/column/column.c index cf8c7a92f5e0..043ab9df2483 100644 --- a/usr.bin/column/column.c +++ b/usr.bin/column/column.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1989, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)column.c 8.4 (Berkeley) 5/4/95"; +static const char sccsid[] = "@(#)column.c 8.4 (Berkeley) 5/4/95"; #endif /* not lint */ #include @@ -79,7 +79,7 @@ main(argc, argv) char *p; if (ioctl(1, TIOCGWINSZ, &win) == -1 || !win.ws_col) { - if (p = getenv("COLUMNS")) + if ((p = getenv("COLUMNS"))) termwidth = atoi(p); } else termwidth = win.ws_col; @@ -109,7 +109,7 @@ main(argc, argv) if (!*argv) input(stdin); else for (; *argv; ++argv) - if (fp = fopen(*argv, "r")) { + if ((fp = fopen(*argv, "r"))) { input(fp); (void)fclose(fp); } else { @@ -150,7 +150,7 @@ c_columnate() endcol = maxlength; putchar('\n'); } else { - while ((cnt = (chcnt + TAB & ~(TAB - 1))) <= endcol) { + while ((cnt = ((chcnt + TAB) & ~(TAB - 1))) <= endcol) { (void)putchar('\t'); chcnt = cnt; } @@ -178,7 +178,7 @@ r_columnate() chcnt += printf("%s", list[base]); if ((base += numrows) >= entries) break; - while ((cnt = (chcnt + TAB & ~(TAB - 1))) <= endcol) { + while ((cnt = ((chcnt + TAB) & ~(TAB - 1))) <= endcol) { (void)putchar('\t'); chcnt = cnt; } @@ -218,7 +218,7 @@ maketbl() cols = emalloc((maxcols = DEFCOLS) * sizeof(char *)); lens = emalloc(maxcols * sizeof(int)); for (cnt = 0, lp = list; cnt < entries; ++cnt, ++lp, ++t) { - for (coloff = 0, p = *lp; cols[coloff] = strtok(p, separator); + for (coloff = 0, p = *lp; (cols[coloff] = strtok(p, separator)); p = NULL) if (++coloff == maxcols) { if (!(cols = realloc(cols, (u_int)maxcols + diff --git a/usr.bin/comm/Makefile b/usr.bin/comm/Makefile index 694202339b32..d311527dfd3a 100644 --- a/usr.bin/comm/Makefile +++ b/usr.bin/comm/Makefile @@ -1,5 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= comm +CFLAGS+=-Wall .include diff --git a/usr.bin/comm/comm.c b/usr.bin/comm/comm.c index debbb0b6f6d0..70e7c0d01616 100644 --- a/usr.bin/comm/comm.c +++ b/usr.bin/comm/comm.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1989, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ @@ -45,7 +45,7 @@ static char copyright[] = static char sccsid[] = "From: @(#)comm.c 8.4 (Berkeley) 5/4/95"; #endif static const char rcsid[] = - "$Id$"; + "$Id: comm.c,v 1.4 1997/09/07 15:09:17 joerg Exp $"; #endif /* not lint */ #include @@ -69,7 +69,7 @@ main(argc, argv) int argc; char *argv[]; { - int comp, file1done, file2done, read1, read2; + int comp, file1done = 0, file2done = 0, read1, read2; int ch, flag1, flag2, flag3, iflag; FILE *fp1, *fp2; char *col1, *col2, *col3; diff --git a/usr.bin/compress/Makefile b/usr.bin/compress/Makefile index 0f6f5ddab9ce..02f7fbbd8810 100644 --- a/usr.bin/compress/Makefile +++ b/usr.bin/compress/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 4/17/94 PROG= compress +CFLAGS+=-Wall SRCS= compress.c zopen.c LINKS= ${BINDIR}/compress ${BINDIR}/uncompress MLINKS= compress.1 uncompress.1 diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c index 5e323d3bde13..e81963527cbd 100644 --- a/usr.bin/compress/compress.c +++ b/usr.bin/compress/compress.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1992, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94"; +static const char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94"; #endif /* not lint */ #include diff --git a/usr.bin/compress/zopen.c b/usr.bin/compress/zopen.c index 5e5357b74b9e..abe31f2de63f 100644 --- a/usr.bin/compress/zopen.c +++ b/usr.bin/compress/zopen.c @@ -388,7 +388,7 @@ output(zs, ocode) * Since ocode is always >= 8 bits, only need to mask the first * hunk on the left. */ - *bp = (*bp & rmask[r_off]) | (ocode << r_off) & lmask[r_off]; + *bp = (*bp & rmask[r_off]) | ((ocode << r_off) & lmask[r_off]); bp++; bits -= (8 - r_off); ocode >>= 8 - r_off; @@ -698,7 +698,7 @@ zopen(fname, mode, bits) { struct s_zstate *zs; - if (mode[0] != 'r' && mode[0] != 'w' || mode[1] != '\0' || + if ((mode[0] != 'r' && mode[0] != 'w') || mode[1] != '\0' || bits < 0 || bits > BITS) { errno = EINVAL; return (NULL); @@ -738,4 +738,5 @@ zopen(fname, mode, bits) return (funopen(zs, NULL, zwrite, NULL, zclose)); } /* NOTREACHED */ + return (NULL); } diff --git a/usr.bin/ctags/Makefile b/usr.bin/ctags/Makefile index 7a8ebce3971c..db595aa38b74 100644 --- a/usr.bin/ctags/Makefile +++ b/usr.bin/ctags/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= ctags +CFLAGS+=-Wall CFLAGS+=-I${.CURDIR} SRCS= C.c ctags.c fortran.c lisp.c print.c tree.c yacc.c diff --git a/usr.bin/ctags/ctags.c b/usr.bin/ctags/ctags.c index 421d819fe311..dc44ba67ad4b 100644 --- a/usr.bin/ctags/ctags.c +++ b/usr.bin/ctags/ctags.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1987, 1993, 1994, 1995\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)ctags.c 8.4 (Berkeley) 2/7/95"; +static const char sccsid[] = "@(#)ctags.c 8.4 (Berkeley) 2/7/95"; #endif /* not lint */ #include diff --git a/usr.bin/ctags/fortran.c b/usr.bin/ctags/fortran.c index 0706b49a0070..d4b2723fe239 100644 --- a/usr.bin/ctags/fortran.c +++ b/usr.bin/ctags/fortran.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)fortran.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)fortran.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/ctags/lisp.c b/usr.bin/ctags/lisp.c index 5f99984b906e..f86e218f44f2 100644 --- a/usr.bin/ctags/lisp.c +++ b/usr.bin/ctags/lisp.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)lisp.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)lisp.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/ctags/print.c b/usr.bin/ctags/print.c index bebdeb1bc90b..65d6737fc2da 100644 --- a/usr.bin/ctags/print.c +++ b/usr.bin/ctags/print.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)print.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)print.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/ctags/tree.c b/usr.bin/ctags/tree.c index 61decd23048c..8e1ec22dd1b0 100644 --- a/usr.bin/ctags/tree.c +++ b/usr.bin/ctags/tree.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)tree.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)tree.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/ctags/yacc.c b/usr.bin/ctags/yacc.c index 1ed4c7d31038..7a27a6e47a68 100644 --- a/usr.bin/ctags/yacc.c +++ b/usr.bin/ctags/yacc.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)yacc.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)yacc.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/cut/Makefile b/usr.bin/cut/Makefile index 19b01009cede..a3467c80ea78 100644 --- a/usr.bin/cut/Makefile +++ b/usr.bin/cut/Makefile @@ -1,5 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= cut +CFLAGS+=-Wall .include diff --git a/usr.bin/cut/cut.c b/usr.bin/cut/cut.c index cc57685ead21..168e7b626d4e 100644 --- a/usr.bin/cut/cut.c +++ b/usr.bin/cut/cut.c @@ -35,13 +35,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1989, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)cut.c 8.3 (Berkeley) 5/4/95"; +static const char sccsid[] = "@(#)cut.c 8.3 (Berkeley) 5/4/95"; #endif /* not lint */ #include @@ -70,7 +70,7 @@ main(argc, argv) char *argv[]; { FILE *fp; - void (*fcn) __P((FILE *, char *)); + void (*fcn) __P((FILE *, char *)) = NULL; int ch; dchar = '\t'; /* default delimiter is \t */ @@ -139,7 +139,7 @@ get_list(list) * overlapping lists. We also handle "-3-5" although there's no * real reason too. */ - for (; p = strtok(list, ", \t"); list = NULL) { + for (; (p = strtok(list, ", \t")); list = NULL) { setautostart = start = stop = 0; if (*p == '-') { ++p; @@ -186,7 +186,7 @@ c_cut(fp, fname) FILE *fp; char *fname; { - register int ch, col; + register int ch = 0, col; register char *pos; for (;;) { diff --git a/usr.bin/dirname/Makefile b/usr.bin/dirname/Makefile index 76b4089abb80..0350db6690b9 100644 --- a/usr.bin/dirname/Makefile +++ b/usr.bin/dirname/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= dirname +CFLAGS+=-Wall NOMAN= noman .include diff --git a/usr.bin/dirname/dirname.c b/usr.bin/dirname/dirname.c index c6ca32682b55..056dc510737a 100644 --- a/usr.bin/dirname/dirname.c +++ b/usr.bin/dirname/dirname.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1991, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)dirname.c 8.4 (Berkeley) 5/4/95"; +static const char sccsid[] = "@(#)dirname.c 8.4 (Berkeley) 5/4/95"; #endif /* not lint */ #include diff --git a/usr.bin/du/Makefile b/usr.bin/du/Makefile index 3b5f1358d5a2..0911b8fc9e6d 100644 --- a/usr.bin/du/Makefile +++ b/usr.bin/du/Makefile @@ -1,5 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= du +CFLAGS+=-Wall .include diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c index 0c806cfd7ca4..ee19f4588d11 100644 --- a/usr.bin/du/du.c +++ b/usr.bin/du/du.c @@ -35,13 +35,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1989, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)du.c 8.5 (Berkeley) 5/4/95"; +static const char sccsid[] = "@(#)du.c 8.5 (Berkeley) 5/4/95"; #endif /* not lint */ diff --git a/usr.bin/ee/Makefile b/usr.bin/ee/Makefile index 08488471f6ad..859d53b92d7a 100644 --- a/usr.bin/ee/Makefile +++ b/usr.bin/ee/Makefile @@ -2,6 +2,7 @@ CFLAGS+= -DCAP -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB \ -DHAS_CTYPE -DHAS_SYS_IOCTL -DHAS_SYS_WAIT -DSLCT_HDR PROG= ee +CFLAGS+=-Wall LINKS= ${BINDIR}/ee ${BINDIR}/ree MLINKS= ee.1 ree.1 DPADD= ${LIBNCURSES} ${LIBMYTINFO} diff --git a/usr.bin/ee/ee.c b/usr.bin/ee/ee.c index 485afeab73b3..bb38c7007d16 100644 --- a/usr.bin/ee/ee.c +++ b/usr.bin/ee/ee.c @@ -52,7 +52,7 @@ #ifndef lint static const char rcsid[] = - "$Id: ee.c,v 1.10 1998/04/30 12:49:11 ache Exp $"; + "$Id: ee.c,v 1.11 1998/10/01 21:18:18 obrien Exp $"; #endif /* not lint */ char *ee_copyright_message = @@ -64,7 +64,7 @@ char *ee_long_notice[] = { "copyright. All rights are reserved." }; -char *version = "@(#) ee, version 1.3 $Revision: 1.10 $"; +char *version = "@(#) ee, version 1.3 $Revision: 1.11 $"; #ifdef NCURSE #include "new_curse.h" @@ -1897,7 +1897,7 @@ char *cmd_str; int number; int i; char *ptr; - char *direction; + char *direction = NULL; struct text *t_line; ptr = cmd_str; @@ -1968,7 +1968,7 @@ char *arguments[]; { char *buff; int count; - struct files *temp_names; + struct files *temp_names = NULL; char *name; char *ptr; @@ -3192,7 +3192,7 @@ struct menu_entries menu_list[]; int counter; int length; int input; - int temp; + int temp = 0; int list_size; int top_offset; /* offset from top where menu items start */ int vert_pos; /* vertical position */ diff --git a/usr.bin/enigma/Makefile b/usr.bin/enigma/Makefile index 404470817fcc..6936b7e7feb1 100644 --- a/usr.bin/enigma/Makefile +++ b/usr.bin/enigma/Makefile @@ -1,4 +1,5 @@ PROG= enigma +CFLAGS+=-Wall MAN1= enigma.1 LINKS= ${BINDIR}/enigma ${BINDIR}/crypt diff --git a/usr.bin/env/Makefile b/usr.bin/env/Makefile index 6b67b73111b8..fadfd080aa69 100644 --- a/usr.bin/env/Makefile +++ b/usr.bin/env/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= env +CFLAGS+=-Wall NOMAN= noman .include diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c index 8894dd070b6d..a5083fbc681e 100644 --- a/usr.bin/env/env.c +++ b/usr.bin/env/env.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1988, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)env.c 8.3 (Berkeley) 4/2/94"; +static const char sccsid[] = "@(#)env.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include diff --git a/usr.bin/error/Makefile b/usr.bin/error/Makefile index 4ec0ba0473e5..3bd5adf89b6b 100644 --- a/usr.bin/error/Makefile +++ b/usr.bin/error/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= error +CFLAGS+=-Wall SRCS= main.c input.c pi.c subr.c filter.c touch.c .include diff --git a/usr.bin/error/pi.c b/usr.bin/error/pi.c index 5984bcabe4c8..c5c1ffb9145c 100644 --- a/usr.bin/error/pi.c +++ b/usr.bin/error/pi.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)pi.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id$"; + "$Id: pi.c,v 1.3 1997/11/03 07:44:15 charnier Exp $"; #endif /* not lint */ #include @@ -208,7 +208,7 @@ extern char **wordv; Errorclass pi() { - char **nwordv; + char **nwordv = NULL; if (wordc < 2) return (C_UNKNOWN); diff --git a/usr.bin/error/touch.c b/usr.bin/error/touch.c index cef09fddcaf7..08952f7b593d 100644 --- a/usr.bin/error/touch.c +++ b/usr.bin/error/touch.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: touch.c,v 1.4 1997/11/03 07:44:25 charnier Exp $"; + "$Id: touch.c,v 1.5 1998/02/25 02:24:04 bde Exp $"; #endif /* not lint */ #include @@ -512,7 +512,7 @@ execvarg(n_pissed_on, r_argc, r_argv) char ***r_argv; { Eptr p; - char *sep; + char *sep = NULL; int fi; (*r_argv) = (char **)Calloc(n_pissed_on + 3, sizeof(char *)); diff --git a/usr.bin/expand/Makefile b/usr.bin/expand/Makefile index 751df256add6..8e1369c98dbd 100644 --- a/usr.bin/expand/Makefile +++ b/usr.bin/expand/Makefile @@ -1,6 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/9/93 PROG= expand +CFLAGS+=-Wall MLINKS= expand.1 unexpand.1 .include diff --git a/usr.bin/expand/expand.c b/usr.bin/expand/expand.c index 37c946446173..a8014f9a44a2 100644 --- a/usr.bin/expand/expand.c +++ b/usr.bin/expand/expand.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1980, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ @@ -42,7 +42,7 @@ static char copyright[] = static char sccsid[] = "@(#)expand.c 8.1 (Berkeley) 6/9/93"; #else static const char rcsid[] = - "$Id: expand.c,v 1.2 1997/07/01 06:34:31 charnier Exp $"; + "$Id: expand.c,v 1.3 1998/02/02 07:10:59 cwt Exp $"; #endif #endif /* not lint */