From 32e97ccd7409faa7c0028480f30414a8aa0d1421 Mon Sep 17 00:00:00 2001 From: dholland Date: Mon, 28 Jan 2008 03:39:30 +0000 Subject: 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.) --- larn/monster.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'larn/monster.c') 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 #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 @@ -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; }; -- cgit v1.2.3