diff options
author | kris <kris@FreeBSD.org> | 2001-05-20 05:44:03 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2001-05-20 05:44:03 +0000 |
commit | 64a6b49535aaa8ef6146a87031ff015e42fc0683 (patch) | |
tree | 6998c793af8787b7f4f3f9f445766a99fd6a1f2c /games/caesar | |
parent | 370c50d30036d203968bd6054c10d19d4affb7ea (diff) | |
download | FreeBSD-src-64a6b49535aaa8ef6146a87031ff015e42fc0683.zip FreeBSD-src-64a6b49535aaa8ef6146a87031ff015e42fc0683.tar.gz |
Silence WARNS=2 and BDECFLAGS on alpha and i386
MFC after: 1 week
Diffstat (limited to 'games/caesar')
-rw-r--r-- | games/caesar/Makefile | 2 | ||||
-rw-r--r-- | games/caesar/caesar.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/games/caesar/Makefile b/games/caesar/Makefile index e63f323..782b87f 100644 --- a/games/caesar/Makefile +++ b/games/caesar/Makefile @@ -8,6 +8,6 @@ SCRIPTS=rot13.sh MAN= caesar.6 MLINKS= caesar.6 rot13.6 -CFLAGS+= -Wall +WARNS= 2 .include <bsd.prog.mk> diff --git a/games/caesar/caesar.c b/games/caesar/caesar.c index da0a437..0b9a9a4 100644 --- a/games/caesar/caesar.c +++ b/games/caesar/caesar.c @@ -80,6 +80,7 @@ double stdf[26] = { 2.62, 0.81, 1.88, 0.23, 2.07, 0.06, }; +int main __P((int, char **)); void printit __P((char *)); int @@ -97,7 +98,7 @@ main(argc, argv) if (argc > 1) printit(argv[1]); - if (!(inbuf = malloc(LINELENGTH))) { + if (!(inbuf = malloc((size_t)LINELENGTH))) { (void)fprintf(stderr, "caesar: out of memory.\n"); exit(1); } @@ -109,7 +110,7 @@ main(argc, argv) /* zero out observation table */ bzero(obs, 26 * sizeof(int)); - if ((nread = read(STDIN_FILENO, inbuf, LINELENGTH)) < 0) { + if ((nread = read(STDIN_FILENO, inbuf, (size_t)LINELENGTH)) < 0) { (void)fprintf(stderr, "caesar: %s\n", strerror(errno)); exit(1); } @@ -148,7 +149,7 @@ main(argc, argv) } if (nread < LINELENGTH) break; - if ((nread = read(STDIN_FILENO, inbuf, LINELENGTH)) < 0) { + if ((nread = read(STDIN_FILENO, inbuf, (size_t)LINELENGTH)) < 0) { (void)fprintf(stderr, "caesar: %s\n", strerror(errno)); exit(1); } |