summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2001-12-03 21:37:35 +0000
committerdwmalone <dwmalone@FreeBSD.org>2001-12-03 21:37:35 +0000
commit383583bd4fd72315ced02ab5741047a6a7f3e7a7 (patch)
tree289e19ab28f237ce4e3c6dbb028a8bbff798eae4
parentd0e180a89a67ffe34aaf88ece44ae7537b7c2350 (diff)
downloadFreeBSD-src-383583bd4fd72315ced02ab5741047a6a7f3e7a7.zip
FreeBSD-src-383583bd4fd72315ced02ab5741047a6a7f3e7a7.tar.gz
Warns cleanups. Add FreeBSD ID to Makefile.
-rw-r--r--usr.bin/tee/Makefile2
-rw-r--r--usr.bin/tee/tee.c6
-rw-r--r--usr.bin/ul/Makefile2
-rw-r--r--usr.bin/ul/ul.c15
-rw-r--r--usr.bin/uniq/Makefile2
-rw-r--r--usr.bin/uniq/uniq.c4
-rw-r--r--usr.bin/unvis/Makefile2
-rw-r--r--usr.bin/unvis/unvis.c5
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 <bsd.prog.mk>
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 <bsd.prog.mk>
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 <bsd.prog.mk>
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 <unistd.h>
#include <vis.h>
-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;
OpenPOWER on IntegriCloud