diff --git a/usr.bin/printf/Makefile b/usr.bin/printf/Makefile index 52b20f4d3599..1e57f837a75e 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 diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 897a063fd9ce..37b18f13d50b 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 d5471379fe1e..ec4d739bf1e9 100644 --- a/usr.bin/renice/Makefile +++ b/usr.bin/renice/Makefile @@ -3,5 +3,6 @@ PROG= renice MAN= renice.8 +WARNS?= 2 .include diff --git a/usr.bin/renice/renice.c b/usr.bin/renice/renice.c index de42e6294869..e169cad004a0 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 022cd27731d8..2f359d36af90 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 diff --git a/usr.bin/sasc/sasc.c b/usr.bin/sasc/sasc.c index 9137a4d043ad..7f0950a31e59 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 55aefd9f4944..f008b35e3591 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 diff --git a/usr.bin/size/size.c b/usr.bin/size/size.c index b42e975da34a..e011ae612cd0 100644 --- a/usr.bin/size/size.c +++ b/usr.bin/size/size.c @@ -54,7 +54,7 @@ static const char rcsid[] = #include #include -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 8f86a6397632..cde738997eeb 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 diff --git a/usr.bin/soelim/soelim.c b/usr.bin/soelim/soelim.c index 2f13c7791c5d..d17943de44e8 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 04b3f022c321..d75ae7bef6c1 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 diff --git a/usr.bin/strings/strings.c b/usr.bin/strings/strings.c index 128292f22b4d..2410ba2901ce 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, "");