From 1f37325e997440c903f6a13aee82c9040608bf2f Mon Sep 17 00:00:00 2001 From: jsm Date: Sun, 8 Feb 2004 00:32:07 +0000 Subject: Mark variables changed between setjmp and longjmp as volatile rather than just taking their addresses. --- phantasia/io.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'phantasia/io.c') 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 */ { -- cgit v1.2.3