diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2001-12-03 21:27:45 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2001-12-03 21:27:45 +0000 |
commit | 71a3cce2f6884be6778c740c9bd96fa224f849a0 (patch) | |
tree | f249bea7b83cc2809cfd62d4327291486ab3ac0f | |
parent | d2c37ac50bb64d6383c3396af34d7c9209611737 (diff) | |
download | FreeBSD-src-71a3cce2f6884be6778c740c9bd96fa224f849a0.zip FreeBSD-src-71a3cce2f6884be6778c740c9bd96fa224f849a0.tar.gz |
Warns cleanups.
-rw-r--r-- | usr.bin/printf/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/printf/printf.c | 10 | ||||
-rw-r--r-- | usr.bin/renice/Makefile | 1 | ||||
-rw-r--r-- | usr.bin/renice/renice.c | 1 | ||||
-rw-r--r-- | usr.bin/sasc/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/sasc/sasc.c | 2 | ||||
-rw-r--r-- | usr.bin/size/Makefile | 1 | ||||
-rw-r--r-- | usr.bin/size/size.c | 4 | ||||
-rw-r--r-- | usr.bin/soelim/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/soelim/soelim.c | 4 | ||||
-rw-r--r-- | usr.bin/strings/Makefile | 1 | ||||
-rw-r--r-- | usr.bin/strings/strings.c | 2 |
12 files changed, 21 insertions, 11 deletions
diff --git a/usr.bin/printf/Makefile b/usr.bin/printf/Makefile index 52b20f4..1e57f83 100644 --- a/usr.bin/printf/Makefile +++ b/usr.bin/printf/Makefile @@ -1,5 +1,7 @@ +# $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= printf +WARNS?= 2 .include <bsd.prog.mk> diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 897a063..37b18f1 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -94,7 +94,7 @@ static int getchr __P((void)); static double getdouble __P((void)); static int getint __P((int *)); static int getquad __P((quad_t *)); -static char *getstr __P((void)); +static const char *getstr __P((void)); static char *mklong __P((char *, int)); static void usage __P((void)); @@ -109,7 +109,7 @@ main(argc, argv) int argc; char *argv[]; { - static char *skip1, *skip2; + static const char *skip1, *skip2; int ch, end, fieldwidth, precision; char convch, nextch, *format, *fmt, *start; @@ -217,7 +217,7 @@ next: for (start = fmt;; ++fmt) { break; } case 's': { - char *p; + const char *p; p = getstr(); PF(start, p); @@ -349,7 +349,7 @@ getchr() return ((int)**gargv++); } -static char * +static const char * getstr() { if (!*gargv) @@ -357,7 +357,7 @@ getstr() return (*gargv++); } -static char *Number = "+-.0123456789"; +static const char *Number = "+-.0123456789"; static int getint(ip) int *ip; diff --git a/usr.bin/renice/Makefile b/usr.bin/renice/Makefile index d547137..ec4d739 100644 --- a/usr.bin/renice/Makefile +++ b/usr.bin/renice/Makefile @@ -3,5 +3,6 @@ PROG= renice MAN= renice.8 +WARNS?= 2 .include <bsd.prog.mk> diff --git a/usr.bin/renice/renice.c b/usr.bin/renice/renice.c index de42e62..e169cad 100644 --- a/usr.bin/renice/renice.c +++ b/usr.bin/renice/renice.c @@ -66,6 +66,7 @@ static void usage __P((void)); */ int main(argc, argv) + int argc; char **argv; { int which = PRIO_PROCESS; diff --git a/usr.bin/sasc/Makefile b/usr.bin/sasc/Makefile index 022cd27..2f359d3 100644 --- a/usr.bin/sasc/Makefile +++ b/usr.bin/sasc/Makefile @@ -1,5 +1,7 @@ +# $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= sasc +WARNS?= 2 .include <bsd.prog.mk> diff --git a/usr.bin/sasc/sasc.c b/usr.bin/sasc/sasc.c index 9137a4d..7f0950a 100644 --- a/usr.bin/sasc/sasc.c +++ b/usr.bin/sasc/sasc.c @@ -67,7 +67,7 @@ main(int argc, char **argv) char c; int fd; - char *file = DEFAULT_FILE; + const char *file = DEFAULT_FILE; int show_dpi = 0; int show_width = 0; diff --git a/usr.bin/size/Makefile b/usr.bin/size/Makefile index 55aefd9..f008b35 100644 --- a/usr.bin/size/Makefile +++ b/usr.bin/size/Makefile @@ -4,5 +4,6 @@ PROG= size MAN= size.1aout BINDIR= /usr/libexec/aout +WARNS?= 2 .include <bsd.prog.mk> diff --git a/usr.bin/size/size.c b/usr.bin/size/size.c index b42e975..e011ae6 100644 --- a/usr.bin/size/size.c +++ b/usr.bin/size/size.c @@ -54,7 +54,7 @@ static const char rcsid[] = #include <stdio.h> #include <string.h> -int show __P((int, char *)); +int show __P((int, const char *)); static void usage __P((void)); int @@ -86,7 +86,7 @@ main(argc, argv) int show(count, name) int count; - char *name; + const char *name; { static int first = 1; struct exec head; diff --git a/usr.bin/soelim/Makefile b/usr.bin/soelim/Makefile index 8f86a63..cde7389 100644 --- a/usr.bin/soelim/Makefile +++ b/usr.bin/soelim/Makefile @@ -1,5 +1,7 @@ +# $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= soelim +WARNS?= 2 .include <bsd.prog.mk> diff --git a/usr.bin/soelim/soelim.c b/usr.bin/soelim/soelim.c index 2f13c77..d17943d 100644 --- a/usr.bin/soelim/soelim.c +++ b/usr.bin/soelim/soelim.c @@ -67,7 +67,7 @@ static const char rcsid[] = */ #define STDIN_NAME "-" -int process __P((char *)); +int process __P((const char *)); int main(argc, argv) @@ -91,7 +91,7 @@ main(argc, argv) int process(file) - char *file; + const char *file; { register char *cp; register int c; diff --git a/usr.bin/strings/Makefile b/usr.bin/strings/Makefile index 04b3f02..d75ae7b 100644 --- a/usr.bin/strings/Makefile +++ b/usr.bin/strings/Makefile @@ -3,6 +3,7 @@ PROG= strings MAN= strings.1aout +WARNS?= 2 BINDIR= /usr/libexec/aout .include <bsd.prog.mk> diff --git a/usr.bin/strings/strings.c b/usr.bin/strings/strings.c index 128292f..2410ba2 100644 --- a/usr.bin/strings/strings.c +++ b/usr.bin/strings/strings.c @@ -84,7 +84,7 @@ main(argc, argv) int exitcode, minlen; short asdata, oflg, fflg; u_char *bfr; - char *file, *p; + const char *file, *p; (void) setlocale(LC_CTYPE, ""); |