diff options
author | archie <archie@FreeBSD.org> | 1998-12-06 22:58:23 +0000 |
---|---|---|
committer | archie <archie@FreeBSD.org> | 1998-12-06 22:58:23 +0000 |
commit | 167c036e91fb24a62d627d16a2f3afa6d875c9e2 (patch) | |
tree | e40a696092a51458b052ff258b3700d51fc2ca09 /usr.bin/cut | |
parent | 3f56407712318be6faa0b98ad8db4b5a83ef4c93 (diff) | |
download | FreeBSD-src-167c036e91fb24a62d627d16a2f3afa6d875c9e2.zip FreeBSD-src-167c036e91fb24a62d627d16a2f3afa6d875c9e2.tar.gz |
Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]).
Diffstat (limited to 'usr.bin/cut')
-rw-r--r-- | usr.bin/cut/Makefile | 1 | ||||
-rw-r--r-- | usr.bin/cut/cut.c | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/cut/Makefile b/usr.bin/cut/Makefile index 19b0100..a3467c8 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 <bsd.prog.mk> diff --git a/usr.bin/cut/cut.c b/usr.bin/cut/cut.c index cc57685..168e7b6 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 <ctype.h> @@ -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 (;;) { |