updates for gcc warnings

This commit is contained in:
cohrs
2005-12-15 04:52:43 +00:00
parent 1b34a48d0c
commit ea13ecbe29
3 changed files with 4 additions and 4 deletions

View File

@@ -900,8 +900,8 @@ register const char *let,*word;
)
foo--;
/* ugly check for unworn armor that can't be worn */
else if (putting_on(word) && *let == ARMOR_CLASS &&
!canwearobj(otmp, &dummymask, FALSE)
else if ((putting_on(word) && *let == ARMOR_CLASS &&
!canwearobj(otmp, &dummymask, FALSE))
/* or unsuitable items rubbed on known touchstone */
|| (!strncmp(word, "rub on the stone", 16) &&
*let == GEM_CLASS &&

View File

@@ -253,7 +253,7 @@ shuffle_all()
/* do whole classes (amulets, &c) */
for (idx = 0; idx < SIZE(shuffle_classes); idx++) {
obj_shuffle_range(bases[shuffle_classes[idx]], &first, &last);
obj_shuffle_range(bases[(int) shuffle_classes[idx]], &first, &last);
shuffle(first, last, TRUE);
}
/* do type ranges (helms, &c) */

View File

@@ -1801,7 +1801,7 @@ register struct attack *mattk;
/* engulfing a cockatrice or digesting a Rider or Medusa */
fatal_gulp = (touch_petrifies(pd) && !Stone_resistance) ||
(mattk->adtyp == AD_DGST && (is_rider(pd) ||
(pd == &mons[PM_MEDUSA]) && !Stone_resistance));
((pd == &mons[PM_MEDUSA]) && !Stone_resistance)));
if ((mattk->adtyp == AD_DGST && !Slow_digestion) || fatal_gulp) {
/* KMH, conduct */