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/global.c | |
parent | 4c39d3d5d3a9a029eecd375d4c55d91ed234cc9c (diff) | |
download | bsdgames-darwin-32e97ccd7409faa7c0028480f30414a8aa0d1421.tar.gz bsdgames-darwin-32e97ccd7409faa7c0028480f30414a8aa0d1421.tar.zst 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/global.c')
-rw-r--r-- | larn/global.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/larn/global.c b/larn/global.c index c4e75bfb..7f03c8b6 100644 --- a/larn/global.c +++ b/larn/global.c @@ -1,4 +1,4 @@ -/* $NetBSD: global.c,v 1.7 2001/02/05 00:57:33 christos Exp $ */ +/* $NetBSD: global.c,v 1.8 2008/01/28 03:39:31 dholland Exp $ */ /* * global.c Larn is copyrighted 1986 by Noah Morgan. @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: global.c,v 1.7 2001/02/05 00:57:33 christos Exp $"); +__RCSID("$NetBSD: global.c,v 1.8 2008/01/28 03:39:31 dholland Exp $"); #endif /* not lint */ #include <string.h> @@ -95,7 +95,7 @@ raiseexperience(x) if (c[LEVEL] != i) { cursors(); beep(); - lprintf("\nWelcome to level %d", (long) c[LEVEL]); /* if we changed levels */ + lprintf("\nWelcome to level %ld", (long) c[LEVEL]); /* if we changed levels */ } bottomline(); } @@ -129,7 +129,7 @@ loseexperience(x) if (i != c[LEVEL]) { cursors(); beep(); - lprintf("\nYou went down to level %d!", (long) c[LEVEL]); + lprintf("\nYou went down to level %ld!", (long) c[LEVEL]); } bottomline(); } |