]> granicus.if.org Git - nethack/commitdiff
Lint cleanup, nothing significant.
authorjwalz <jwalz>
Wed, 19 Feb 2003 03:18:49 +0000 (03:18 +0000)
committerjwalz <jwalz>
Wed, 19 Feb 2003 03:18:49 +0000 (03:18 +0000)
There is one more new complaint that might cause problems:
explode.c(545): warning: conversion from long may lose accuracy

src/files.c
src/hack.c
src/mhitm.c
src/mhitu.c
src/muse.c
src/pray.c
src/uhitm.c

index ef1a6ac6e4c3044fe6b3de474aab3d5d7754513c..2d33ba7c009c84206592066c3dcfd2a0021533d8 100644 (file)
@@ -293,6 +293,7 @@ int whichprefix, buffnum;
 }
 
 /* reasonbuf must be at least BUFSZ, supplied by caller */
+/*ARGSUSED*/
 int
 validate_prefix_locations(reasonbuf)
 char *reasonbuf;
@@ -923,6 +924,7 @@ restore_saved_game()
        return fd;
 }
 
+/*ARGSUSED*/
 static char*
 plname_from_file(filename)
 const char* filename;
@@ -1014,8 +1016,8 @@ char** saved;
 {
     if ( saved ) {
        int i=0;
-       while (saved[i]) free(saved[i++]);
-       free(saved);
+       while (saved[i]) free((genericptr_t)saved[i++]);
+       free((genericptr_t)saved);
     }
 }
 
index 7f5308b8fef2357011fc95dc86f5ae2dec215cb1..cc7c8ef384365f0e7b1a1113bc2945a9ca9c9c1a 100644 (file)
@@ -805,7 +805,7 @@ boolean guess;
                u.dy = sgn(u.ty - u.uy);
                if (test_move(u.ux, u.uy, u.dx, u.dy, TEST_MOVE))
                    return TRUE;
-               goto done;
+               goto found;
            }
            tx = px;
            ty = py;
@@ -819,7 +819,7 @@ boolean guess;
        return FALSE;
     }
 
-done:
+found:
     u.dx = 0;
     u.dy = 0;
     nomul(0);
index ca47ca082db2cf5234746b4e869383a7ca3c67f7..f6c258064f858f8d50babb7bda0b3010f8730732 100644 (file)
@@ -577,7 +577,7 @@ mdamagem(magr, mdef, mattk)
        boolean cancelled;
 
        if (touch_petrifies(pd) && !resists_ston(magr)) {
-           long protector = attk_protection(mattk->aatyp),
+           long protector = attk_protection((int)mattk->aatyp),
                 wornitems = magr->misc_worn_check;
 
            /* wielded weapon gives same protection as gloves here */
index 04fb991d9d263db1320caa2b63206b953c48fb7d..54b83e1288b73b1de667a61af3467f17af0f8699 100644 (file)
@@ -2434,7 +2434,7 @@ register struct attack *mattk;
                goto assess_dmg;
            case AD_STON: /* cockatrice */
            {
-               long protector = attk_protection(mattk->aatyp),
+               long protector = attk_protection((int)mattk->aatyp),
                     wornitems = mtmp->misc_worn_check;
 
                /* wielded weapon gives same protection as gloves here */
index 43bf8c570860e94ba410c0ffb175ae778042f3b1..5de3adede2a890ffbacd1b48916d994e9b866594 100644 (file)
@@ -1153,7 +1153,7 @@ register struct obj *otmp;
                break;
        case WAN_CANCELLATION:
        case SPE_CANCELLATION:
-               cancel_monst(mtmp, otmp, FALSE, TRUE, FALSE);
+               (void) cancel_monst(mtmp, otmp, FALSE, TRUE, FALSE);
                break;
        }
        if (reveal_invis) {
index 4714d153114f9b7f29abd80eaecf47b278af02ff..75468cfb23d07848c7f2668f1b290e7a8834d005 100644 (file)
@@ -353,6 +353,7 @@ register int trouble;
                    else if (Cursed_obj(uarmf, FUMBLE_BOOTS))
                        otmp = uarmf;
                    goto decurse;
+                   /*NOTREACHED*/
                    break;
            case TROUBLE_CURSED_ITEMS:
                    otmp = worst_cursed_item();
index 3824654f4fea33eaa4c271ae33b3653e8d0ee5b3..c7169fe6768ce2deb97153d131074b452fe4eccc 100644 (file)
@@ -711,6 +711,7 @@ int thrown;
                                shk_your(yourbuf, obj));
                        useup(obj);
                        return(TRUE);
+                       /*NOTREACHED*/
                        break;
 #endif
                    case CORPSE:                /* fixed by polder@cs.vu.nl */
@@ -2138,7 +2139,7 @@ uchar aatyp;
            break;
          case AD_STON:
            if (mhit) {         /* successful attack */
-               long protector = attk_protection(aatyp);
+               long protector = attk_protection((int)aatyp);
 
                /* hero using monsters' AT_MAGC attack is hitting hand to
                   hand rather than casting a spell */