From: Pasi Kallinen Date: Tue, 31 Mar 2015 07:20:20 +0000 (+0300) Subject: Revert one GCC warning X-Git-Tag: NetHack-3.6.0_RC01~502 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19aeb91dc4f5597059676a5205afa3e2c3e7ff8e;p=nethack Revert one GCC warning --- diff --git a/src/trap.c b/src/trap.c index f30fb5a6d..3c3f66642 100644 --- a/src/trap.c +++ b/src/trap.c @@ -4266,7 +4266,7 @@ boolean trapdoor_only; boolean *noticed; /* set to true iff hero notices the effect; */ { /* otherwise left with its previous value intact */ struct trap *t; - boolean ishero = (mon == &youmonst); + boolean ishero = (mon == &youmonst), result; if (mon == u.usteed) ishero = TRUE; t = t_at(ishero ? u.ux : mon->mx, ishero ? u.uy : mon->my); @@ -4281,6 +4281,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */ if (u.utrap) return FALSE; /* already trapped */ *noticed = TRUE; dotrap(t, FORCETRAP); + result = (u.utrap != 0); } else { if (mon->mtrapped) return FALSE; /* already trapped */ /* you notice it if you see the trap close/tremble/whatever @@ -4289,6 +4290,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */ /* monster will be angered; mintrap doesn't handle that */ wakeup(mon); ++force_mintrap; + result = (mintrap(mon) != 0); --force_mintrap; /* mon might now be on the migrating monsters list */ }