From: cohrs Date: Thu, 15 Dec 2005 04:52:43 +0000 (+0000) Subject: updates for gcc warnings X-Git-Tag: MOVE2GIT~1181 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea13ecbe29896e60c90ad064d3523c58109e1299;p=nethack updates for gcc warnings --- diff --git a/src/invent.c b/src/invent.c index 3064ae950..f128178dc 100644 --- a/src/invent.c +++ b/src/invent.c @@ -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 && diff --git a/src/o_init.c b/src/o_init.c index ceb35d3c8..d019ef23b 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -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) */ diff --git a/src/uhitm.c b/src/uhitm.c index db7262598..feb78cd55 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -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 */