summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--games/caesar/Makefile2
-rw-r--r--games/caesar/caesar.c7
-rw-r--r--games/pom/Makefile3
-rw-r--r--games/pom/pom.c1
4 files changed, 8 insertions, 5 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);
}
diff --git a/games/pom/Makefile b/games/pom/Makefile
index afde919..e139ce9 100644
--- a/games/pom/Makefile
+++ b/games/pom/Makefile
@@ -5,6 +5,7 @@ PROG= pom
MAN= pom.6
DPADD= ${LIBM}
LDADD= -lm
-CFLAGS+=-Wall
+
+WARNS= 2
.include <bsd.prog.mk>
diff --git a/games/pom/pom.c b/games/pom/pom.c
index 2407911..90e0f42 100644
--- a/games/pom/pom.c
+++ b/games/pom/pom.c
@@ -75,6 +75,7 @@ static const char rcsid[] =
static void adj360 __P((double *));
static double dtor __P((double));
+int main __P((void));
static double potm __P((double));
int
OpenPOWER on IntegriCloud