diff options
| author | David Malone <dwmalone@FreeBSD.org> | 2001-12-03 21:27:45 +0000 |
|---|---|---|
| committer | David Malone <dwmalone@FreeBSD.org> | 2001-12-03 21:27:45 +0000 |
| commit | 45af1a4cbd74d8ca93f64923e54ccbecf130574f (patch) | |
| tree | f249bea7b83cc2809cfd62d4327291486ab3ac0f /usr.bin/printf | |
| parent | 6e878749df2bdadf9433851a2ec73bf3f8fe6a70 (diff) | |
Notes
Diffstat (limited to 'usr.bin/printf')
| -rw-r--r-- | usr.bin/printf/Makefile | 2 | ||||
| -rw-r--r-- | usr.bin/printf/printf.c | 10 |
2 files changed, 7 insertions, 5 deletions
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 <bsd.prog.mk> 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; |
