From b484917d53eba81a0de79a426ba753c754660d17 Mon Sep 17 00:00:00 2001 From: Stefan Farfeleder Date: Sun, 1 May 2005 19:34:22 +0000 Subject: [PATCH] Make caesar and pom WARNS 6 clean. While there, use prototypes everywhere. PR: 62456 --- games/caesar/Makefile | 2 +- games/caesar/caesar.c | 8 +++----- games/pom/Makefile | 2 +- games/pom/pom.c | 11 ++++------- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/games/caesar/Makefile b/games/caesar/Makefile index 68a37ddf4170..ebb770e861e4 100644 --- a/games/caesar/Makefile +++ b/games/caesar/Makefile @@ -8,6 +8,6 @@ SCRIPTS=rot13.sh MAN= caesar.6 MLINKS= caesar.6 rot13.6 -WARNS?= 2 +WARNS?= 6 .include diff --git a/games/caesar/caesar.c b/games/caesar/caesar.c index 54275ce84e35..25c0a123bd4f 100644 --- a/games/caesar/caesar.c +++ b/games/caesar/caesar.c @@ -80,9 +80,7 @@ double stdf[26] = { void printit(char *); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { int ch, dot, i, nread, winnerdot = 0; char *inbuf; @@ -153,8 +151,8 @@ main(argc, argv) exit(0); } -void printit(arg) - char *arg; +void +printit(char *arg) { int ch, rot; diff --git a/games/pom/Makefile b/games/pom/Makefile index 0831496813b7..332f3cf1aeaf 100644 --- a/games/pom/Makefile +++ b/games/pom/Makefile @@ -6,6 +6,6 @@ MAN= pom.6 DPADD= ${LIBM} LDADD= -lm -WARNS?= 2 +WARNS?= 6 .include diff --git a/games/pom/pom.c b/games/pom/pom.c index ea8a608d8161..d245f34bd7f2 100644 --- a/games/pom/pom.c +++ b/games/pom/pom.c @@ -78,7 +78,7 @@ static double dtor(double); static double potm(double); int -main() +main(void) { time_t tt; struct tm *GMT; @@ -122,8 +122,7 @@ main() * return phase of the moon */ static double -potm(days) - double days; +potm(double days) { double N, Msol, Ec, LambdaSol, l, Mm, Ev, Ac, A3, Mmprime; double A4, lprime, V, ldprime, D, Nm; @@ -159,8 +158,7 @@ potm(days) * convert degrees to radians */ static double -dtor(deg) - double deg; +dtor(double deg) { return(deg * PI / 180); } @@ -170,8 +168,7 @@ dtor(deg) * adjust value so 0 <= deg <= 360 */ static void -adj360(deg) - double *deg; +adj360(double *deg) { for (;;) if (*deg < 0)