]> granicus.if.org Git - nethack/commitdiff
updates for gcc warnings
authorcohrs <cohrs>
Thu, 15 Dec 2005 04:52:43 +0000 (04:52 +0000)
committercohrs <cohrs>
Thu, 15 Dec 2005 04:52:43 +0000 (04:52 +0000)
src/invent.c
src/o_init.c
src/uhitm.c

index 3064ae950ed61298f8b35c48eeb7fc6d7a003eff..f128178dce9b3fd33737a9152a713fa9d6a08548 100644 (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 &&
index ceb35d3c8b76c7fdbf50af82629882b34008bf08..d019ef23b8ec3a21da467fd799ffdd87f7aefbae 100644 (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) */
index db7262598e1808a22290f4886a11330cc21d60f3..feb78cd55f4838df7dc62d97ec7e7e9ef0fb613b 100644 (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 */