aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/comm
diff options
context:
space:
mode:
authorMark Murray <markm@FreeBSD.org>2001-12-02 13:18:59 +0000
committerMark Murray <markm@FreeBSD.org>2001-12-02 13:18:59 +0000
commitbcdc82df70b61020d3451a2a0f96dd36ec83ec85 (patch)
treee45bfe7eaa5d1e3414e3de7d8bdade9cab756e57 /usr.bin/comm
parent3fa15ce5d8c2bff56d3e11f1a47e264ae30514d3 (diff)
WARNS=2 fixup.
Notes
Notes: svn path=/head/; revision=87213
Diffstat (limited to 'usr.bin/comm')
-rw-r--r--usr.bin/comm/Makefile3
-rw-r--r--usr.bin/comm/comm.c12
2 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/comm/Makefile b/usr.bin/comm/Makefile
index d311527dfd3a..0b2a2bd75434 100644
--- a/usr.bin/comm/Makefile
+++ b/usr.bin/comm/Makefile
@@ -1,6 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
+# $FreeBSD$
PROG= comm
-CFLAGS+=-Wall
+WARNS?= 2
.include <bsd.prog.mk>
diff --git a/usr.bin/comm/comm.c b/usr.bin/comm/comm.c
index ad88fccb38a0..4a359843f479 100644
--- a/usr.bin/comm/comm.c
+++ b/usr.bin/comm/comm.c
@@ -59,10 +59,10 @@ static const char rcsid[] =
#define MAXLINELEN (LINE_MAX + 1)
-char *tabs[] = { "", "\t", "\t\t" };
+const char *tabs[] = { "", "\t", "\t\t" };
FILE *file __P((char *));
-void show __P((FILE *, char *, char *));
+void show __P((FILE *, const char *, char *));
int stricoll __P((char *, char *));
static void usage __P((void));
@@ -74,8 +74,9 @@ main(argc, argv)
int comp, file1done = 0, file2done = 0, read1, read2;
int ch, flag1, flag2, flag3, iflag;
FILE *fp1, *fp2;
- char *col1, *col2, *col3;
- char **p, line1[MAXLINELEN], line2[MAXLINELEN];
+ const char *col1, *col2, *col3;
+ char line1[MAXLINELEN], line2[MAXLINELEN];
+ const char **p;
flag1 = flag2 = flag3 = 1;
iflag = 0;
@@ -173,7 +174,8 @@ done: argc -= optind;
void
show(fp, offset, buf)
FILE *fp;
- char *offset, *buf;
+ const char *offset;
+ char *buf;
{
do {