From 383583bd4fd72315ced02ab5741047a6a7f3e7a7 Mon Sep 17 00:00:00 2001 From: dwmalone Date: Mon, 3 Dec 2001 21:37:35 +0000 Subject: Warns cleanups. Add FreeBSD ID to Makefile. --- usr.bin/tee/Makefile | 2 ++ usr.bin/tee/tee.c | 6 +++--- usr.bin/ul/Makefile | 2 ++ usr.bin/ul/ul.c | 15 ++++++++------- usr.bin/uniq/Makefile | 2 ++ usr.bin/uniq/uniq.c | 4 ++-- usr.bin/unvis/Makefile | 2 ++ usr.bin/unvis/unvis.c | 5 +++-- 8 files changed, 24 insertions(+), 14 deletions(-) diff --git a/usr.bin/tee/Makefile b/usr.bin/tee/Makefile index a713132..49cb861 100644 --- a/usr.bin/tee/Makefile +++ b/usr.bin/tee/Makefile @@ -1,5 +1,7 @@ +# $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= tee +WARNS?= 2 .include diff --git a/usr.bin/tee/tee.c b/usr.bin/tee/tee.c index c393200..da541ff 100644 --- a/usr.bin/tee/tee.c +++ b/usr.bin/tee/tee.c @@ -58,11 +58,11 @@ static const char rcsid[] = typedef struct _list { struct _list *next; int fd; - char *name; + const char *name; } LIST; LIST *head; -void add __P((int, char *)); +void add __P((int, const char *)); static void usage __P((void)); int @@ -134,7 +134,7 @@ usage() void add(fd, name) int fd; - char *name; + const char *name; { LIST *p; diff --git a/usr.bin/ul/Makefile b/usr.bin/ul/Makefile index 645c291..a28e590 100644 --- a/usr.bin/ul/Makefile +++ b/usr.bin/ul/Makefile @@ -1,6 +1,8 @@ +# $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= ul +WARNS?= 2 DPADD= ${LIBTERMCAP} LDADD= -ltermcap diff --git a/usr.bin/ul/ul.c b/usr.bin/ul/ul.c index 597add1..409bae8 100644 --- a/usr.bin/ul/ul.c +++ b/usr.bin/ul/ul.c @@ -68,7 +68,8 @@ static const char rcsid[] = #define BOLD 020 /* Bold */ int must_use_uc, must_overstrike; -char *CURS_UP, *CURS_RIGHT, *CURS_LEFT, +const char + *CURS_UP, *CURS_RIGHT, *CURS_LEFT, *ENTER_STANDOUT, *EXIT_STANDOUT, *ENTER_UNDERLINE, *EXIT_UNDERLINE, *ENTER_DIM, *ENTER_BOLD, *ENTER_REVERSE, *UNDER_CHAR, *EXIT_ATTRIBUTES; @@ -105,7 +106,7 @@ main(argc, argv) char **argv; { int c; - char *termtype; + const char *termtype; FILE *f; char termcap[1024]; @@ -117,7 +118,7 @@ main(argc, argv) case 't': case 'T': /* for nroff compatibility */ - termtype = optarg; + termtype = optarg; break; case 'i': iflag = 1; @@ -168,7 +169,7 @@ void filter(f) FILE *f; { - register c; + int c; while ((c = getc(f)) != EOF && col < MAXBUF) switch(c) { @@ -278,8 +279,8 @@ filter(f) void flushln() { - register lastmode; - register i; + int lastmode; + int i; int hadmodes = 0; lastmode = NORMAL; @@ -390,7 +391,7 @@ initbuf() void fwd() { - register oldcol, oldmax; + int oldcol, oldmax; oldcol = col; oldmax = maxcol; diff --git a/usr.bin/uniq/Makefile b/usr.bin/uniq/Makefile index fa0db8b..fa73ea4 100644 --- a/usr.bin/uniq/Makefile +++ b/usr.bin/uniq/Makefile @@ -1,5 +1,7 @@ +# $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= uniq +WARNS?= 2 .include diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index 07e25a0..1237228 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -62,7 +62,7 @@ static const char rcsid[] = int cflag, dflag, uflag; int numchars, numfields, repeats; -FILE *file __P((char *, char *)); +FILE *file __P((const char *, const char *)); void show __P((FILE *, char *)); char *skip __P((char *)); void obsolete __P((char *[])); @@ -216,7 +216,7 @@ skip(str) FILE * file(name, mode) - char *name, *mode; + const char *name, *mode; { FILE *fp; diff --git a/usr.bin/unvis/Makefile b/usr.bin/unvis/Makefile index a6807ff..d50d344 100644 --- a/usr.bin/unvis/Makefile +++ b/usr.bin/unvis/Makefile @@ -1,5 +1,7 @@ +# $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= unvis +WARNS?= 2 .include diff --git a/usr.bin/unvis/unvis.c b/usr.bin/unvis/unvis.c index 8cfe1f2..d582a83 100644 --- a/usr.bin/unvis/unvis.c +++ b/usr.bin/unvis/unvis.c @@ -51,11 +51,12 @@ static const char rcsid[] = #include #include -void process __P((FILE *, char *)); +void process __P((FILE *, const char *)); static void usage __P((void)); int main(argc, argv) + int argc; char *argv[]; { FILE *fp; @@ -93,7 +94,7 @@ usage() void process(fp, filename) FILE *fp; - char *filename; + const char *filename; { register int offset = 0, c, ret; int state = 0; -- cgit v1.1