Mark variables changed between setjmp and longjmp as volatile rather
than just taking their addresses.
This commit is contained in:
parent
e7d3d51380
commit
d035cfe33e
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: fight.c,v 1.7 2000/04/27 00:30:53 jdc Exp $ */
|
/* $NetBSD: fight.c,v 1.8 2004/02/08 00:32:07 jsm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* fight.c Phantasia monster fighting routines
|
* fight.c Phantasia monster fighting routines
|
||||||
@ -10,18 +10,14 @@ void
|
|||||||
encounter(particular)
|
encounter(particular)
|
||||||
int particular;
|
int particular;
|
||||||
{
|
{
|
||||||
bool firsthit = Player.p_blessing; /* set if player gets the
|
volatile bool firsthit = Player.p_blessing; /* set if player gets
|
||||||
* first hit */
|
* the first hit */
|
||||||
int flockcnt = 1; /* how many time flocked */
|
volatile int flockcnt = 1; /* how many time flocked */
|
||||||
|
|
||||||
/* let others know what we are doing */
|
/* let others know what we are doing */
|
||||||
Player.p_status = S_MONSTER;
|
Player.p_status = S_MONSTER;
|
||||||
writerecord(&Player, Fileloc);
|
writerecord(&Player, Fileloc);
|
||||||
|
|
||||||
#if __GNUC__
|
|
||||||
(void)&firsthit; /* XXX shut up gcc */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SYS5
|
#ifdef SYS5
|
||||||
flushinp();
|
flushinp();
|
||||||
#endif
|
#endif
|
||||||
|
@ -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
|
* io.c - input/output routines for Phantasia
|
||||||
@ -157,15 +157,12 @@ getanswer(choices, def)
|
|||||||
bool def;
|
bool def;
|
||||||
{
|
{
|
||||||
int ch; /* input */
|
int ch; /* input */
|
||||||
int loop; /* counter */
|
volatile int loop; /* counter */
|
||||||
int oldx, oldy; /* original coordinates on screen */
|
volatile int oldx, oldy; /* original coordinates on screen */
|
||||||
|
|
||||||
getyx(stdscr, oldy, oldx);
|
getyx(stdscr, oldy, oldx);
|
||||||
alarm(0); /* make sure alarm is off */
|
alarm(0); /* make sure alarm is off */
|
||||||
|
|
||||||
#if __GNUC__
|
|
||||||
(void)&loop; /* XXX quiet gcc */
|
|
||||||
#endif
|
|
||||||
for (loop = 3; loop; --loop)
|
for (loop = 3; loop; --loop)
|
||||||
/* try for 3 times */
|
/* try for 3 times */
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user