Make caesar and pom WARNS 6 clean. While there, use prototypes everywhere.

PR:	62456
This commit is contained in:
Stefan Farfeleder 2005-05-01 19:34:22 +00:00
parent 7d23fba22f
commit b484917d53
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145782
4 changed files with 9 additions and 14 deletions

View File

@ -8,6 +8,6 @@ SCRIPTS=rot13.sh
MAN= caesar.6 MAN= caesar.6
MLINKS= caesar.6 rot13.6 MLINKS= caesar.6 rot13.6
WARNS?= 2 WARNS?= 6
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -80,9 +80,7 @@ double stdf[26] = {
void printit(char *); void printit(char *);
int int
main(argc, argv) main(int argc, char **argv)
int argc;
char **argv;
{ {
int ch, dot, i, nread, winnerdot = 0; int ch, dot, i, nread, winnerdot = 0;
char *inbuf; char *inbuf;
@ -153,8 +151,8 @@ main(argc, argv)
exit(0); exit(0);
} }
void printit(arg) void
char *arg; printit(char *arg)
{ {
int ch, rot; int ch, rot;

View File

@ -6,6 +6,6 @@ MAN= pom.6
DPADD= ${LIBM} DPADD= ${LIBM}
LDADD= -lm LDADD= -lm
WARNS?= 2 WARNS?= 6
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -78,7 +78,7 @@ static double dtor(double);
static double potm(double); static double potm(double);
int int
main() main(void)
{ {
time_t tt; time_t tt;
struct tm *GMT; struct tm *GMT;
@ -122,8 +122,7 @@ main()
* return phase of the moon * return phase of the moon
*/ */
static double static double
potm(days) potm(double days)
double days;
{ {
double N, Msol, Ec, LambdaSol, l, Mm, Ev, Ac, A3, Mmprime; double N, Msol, Ec, LambdaSol, l, Mm, Ev, Ac, A3, Mmprime;
double A4, lprime, V, ldprime, D, Nm; double A4, lprime, V, ldprime, D, Nm;
@ -159,8 +158,7 @@ potm(days)
* convert degrees to radians * convert degrees to radians
*/ */
static double static double
dtor(deg) dtor(double deg)
double deg;
{ {
return(deg * PI / 180); return(deg * PI / 180);
} }
@ -170,8 +168,7 @@ dtor(deg)
* adjust value so 0 <= deg <= 360 * adjust value so 0 <= deg <= 360
*/ */
static void static void
adj360(deg) adj360(double *deg)
double *deg;
{ {
for (;;) for (;;)
if (*deg < 0) if (*deg < 0)