diff options
| author | dholland <dholland@NetBSD.org> | 2008-01-28 03:39:30 +0000 |
|---|---|---|
| committer | dholland <dholland@NetBSD.org> | 2008-01-28 03:39:30 +0000 |
| commit | 32e97ccd7409faa7c0028480f30414a8aa0d1421 (patch) | |
| tree | b5c3684808fd1ce9002cdf547760ab4e3eedd2ef /larn/monster.c | |
| parent | 4c39d3d5d3a9a029eecd375d4c55d91ed234cc9c (diff) | |
| download | bsdgames-darwin-32e97ccd7409faa7c0028480f30414a8aa0d1421.tar.gz bsdgames-darwin-32e97ccd7409faa7c0028480f30414a8aa0d1421.zip | |
Add gcc printf format checking, and fix the abundant problems this revealed.
(It appears that someone sometime thought that you use %d to print a long.)
Diffstat (limited to 'larn/monster.c')
| -rw-r--r-- | larn/monster.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/larn/monster.c b/larn/monster.c index 7a3c54e2..ab78b91e 100644 --- a/larn/monster.c +++ b/larn/monster.c @@ -1,4 +1,4 @@ -/* $NetBSD: monster.c,v 1.11 2007/04/22 02:09:02 mouse Exp $ */ +/* $NetBSD: monster.c,v 1.12 2008/01/28 03:39:31 dholland Exp $ */ /* * monster.c Larn is copyrighted 1986 by Noah Morgan. @@ -100,7 +100,7 @@ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: monster.c,v 1.11 2007/04/22 02:09:02 mouse Exp $"); +__RCSID("$NetBSD: monster.c,v 1.12 2008/01/28 03:39:31 dholland Exp $"); #endif /* not lint */ #include <string.h> @@ -130,7 +130,7 @@ createmonster(mon) if (mon < 1 || mon > MAXMONST + 8) { /* check for monster number * out of bounds */ beep(); - lprintf("\ncan't createmonst(%d)\n", (long) mon); + lprintf("\ncan't createmonst(%ld)\n", (long) mon); nap(3000); return; } @@ -623,7 +623,7 @@ ws: direct(x, fullhit(i), p, i); /* sleep */ return; default: - lprintf(" spell %d not available!", (long) x); + lprintf(" spell %ld not available!", (long) x); beep(); return; }; |
