diff options
author | jsm <jsm@NetBSD.org> | 2004-02-08 00:32:07 +0000 |
---|---|---|
committer | jsm <jsm@NetBSD.org> | 2004-02-08 00:32:07 +0000 |
commit | 1f37325e997440c903f6a13aee82c9040608bf2f (patch) | |
tree | 36b4f6156e7984db5cd80decd68914de7a3d010b /phantasia/io.c | |
parent | 812482eb24c871be129d3faf80e646894c96c4aa (diff) | |
download | bsdgames-darwin-1f37325e997440c903f6a13aee82c9040608bf2f.tar.gz bsdgames-darwin-1f37325e997440c903f6a13aee82c9040608bf2f.tar.zst bsdgames-darwin-1f37325e997440c903f6a13aee82c9040608bf2f.zip |
Mark variables changed between setjmp and longjmp as volatile rather
than just taking their addresses.
Diffstat (limited to 'phantasia/io.c')
-rw-r--r-- | phantasia/io.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/phantasia/io.c b/phantasia/io.c index 17da74b1..5a4c0093 100644 --- a/phantasia/io.c +++ b/phantasia/io.c @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.5 1999/09/08 21:45:29 jsm Exp $ */ +/* $NetBSD: io.c,v 1.6 2004/02/08 00:32:07 jsm Exp $ */ /* * io.c - input/output routines for Phantasia @@ -157,15 +157,12 @@ getanswer(choices, def) bool def; { int ch; /* input */ - int loop; /* counter */ - int oldx, oldy; /* original coordinates on screen */ + volatile int loop; /* counter */ + volatile int oldx, oldy; /* original coordinates on screen */ getyx(stdscr, oldy, oldx); alarm(0); /* make sure alarm is off */ -#if __GNUC__ - (void)&loop; /* XXX quiet gcc */ -#endif for (loop = 3; loop; --loop) /* try for 3 times */ { |