gcc compilation warning bits
some rather complex boolean operations needed more parentheses to avoid warnings. I think I put them in the right places. A couple other items: naked assignments in if stmts, and an extra function decl
This commit is contained in:
@@ -62,7 +62,6 @@ STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P, struct lch
|
||||
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
mapseen *mapseenchn = (struct mapseen *)0;
|
||||
STATIC_DCL void FDECL(free_mapseen, (mapseen *));
|
||||
STATIC_DCL mapseen *FDECL(load_mapseen, (int));
|
||||
STATIC_DCL void FDECL(save_mapseen, (int, mapseen *));
|
||||
STATIC_DCL mapseen *FDECL(find_mapseen, (d_level *));
|
||||
@@ -1841,7 +1840,7 @@ recbranch_mapseen(source, dest)
|
||||
/* branch not found, so not a real branch. */
|
||||
if (!br) return;
|
||||
|
||||
if (mptr = find_mapseen(source)) {
|
||||
if ((mptr = find_mapseen(source)) != 0) {
|
||||
if (mptr->br && br != mptr->br)
|
||||
impossible("Two branches on the same level?");
|
||||
mptr->br = br;
|
||||
@@ -2038,13 +2037,13 @@ d_level *lev;
|
||||
}
|
||||
|
||||
#define INTEREST(feat) \
|
||||
((feat).nfount) || \
|
||||
((feat).nsink) || \
|
||||
((feat).nthrone) || \
|
||||
((feat).naltar) || \
|
||||
((feat).nshop) || \
|
||||
((feat).ntemple) || \
|
||||
((feat).ntree)
|
||||
((feat).nfount || \
|
||||
(feat).nsink || \
|
||||
(feat).nthrone || \
|
||||
(feat).naltar || \
|
||||
(feat).nshop || \
|
||||
(feat).ntemple || \
|
||||
(feat).ntree)
|
||||
/*
|
||||
|| ((feat).water) || \
|
||||
((feat).ice) || \
|
||||
@@ -2056,11 +2055,12 @@ STATIC_OVL boolean
|
||||
interest_mapseen(mptr)
|
||||
mapseen *mptr;
|
||||
{
|
||||
return (on_level(&u.uz, &mptr->lev) || (!mptr->feat.forgot) && (
|
||||
return on_level(&u.uz, &mptr->lev) ||
|
||||
(!mptr->feat.forgot && (
|
||||
INTEREST(mptr->feat) ||
|
||||
(mptr->custom) ||
|
||||
(mptr->br)
|
||||
));
|
||||
));
|
||||
}
|
||||
|
||||
/* recalculate mapseen for the current level */
|
||||
@@ -2347,7 +2347,7 @@ boolean printdun;
|
||||
/* wizmode prints out proto dungeon names for clarity */
|
||||
if (wizard) {
|
||||
s_level *slev;
|
||||
if (slev = Is_special(&mptr->lev))
|
||||
if ((slev = Is_special(&mptr->lev)) != 0)
|
||||
Sprintf(eos(buf), " [%s]", slev->proto);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2129,9 +2129,9 @@ boolean by_you;
|
||||
/* monsters can also use potions of acid */
|
||||
if (obj->otyp == POT_ACID ||
|
||||
((obj->otyp == CORPSE || (obj->otyp == TIN && tinok)) &&
|
||||
obj->corpsenm == PM_LIZARD ||
|
||||
(acidic(&mons[obj->corpsenm]) &&
|
||||
obj->corpsenm != PM_GREEN_SLIME))) {
|
||||
(obj->corpsenm == PM_LIZARD ||
|
||||
(acidic(&mons[obj->corpsenm]) &&
|
||||
obj->corpsenm != PM_GREEN_SLIME)))) {
|
||||
mon_consume_unstone(mon, obj, by_you, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -370,9 +370,9 @@ do_pit: chasm = maketrap(x,y,PIT);
|
||||
exercise(A_DEX, TRUE);
|
||||
else
|
||||
selftouch((Upolyd &&
|
||||
slithy(youmonst.data) ||
|
||||
nolimbs(youmonst.data)) ?
|
||||
"Shaken, you" : "Falling down, you");
|
||||
(slithy(youmonst.data) ||
|
||||
nolimbs(youmonst.data))) ?
|
||||
"Shaken, you" : "Falling down, you");
|
||||
}
|
||||
} else newsym(x,y);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user