From: jwalz Date: Wed, 19 Feb 2003 03:18:49 +0000 (+0000) Subject: Lint cleanup, nothing significant. X-Git-Tag: MOVE2GIT~2159 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6689de0e04536df085d1deae3aeba4fdcf77c9c7;p=nethack Lint cleanup, nothing significant. There is one more new complaint that might cause problems: explode.c(545): warning: conversion from long may lose accuracy --- diff --git a/src/files.c b/src/files.c index ef1a6ac6e..2d33ba7c0 100644 --- a/src/files.c +++ b/src/files.c @@ -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); } } diff --git a/src/hack.c b/src/hack.c index 7f5308b8f..cc7c8ef38 100644 --- a/src/hack.c +++ b/src/hack.c @@ -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); diff --git a/src/mhitm.c b/src/mhitm.c index ca47ca082..f6c258064 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -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 */ diff --git a/src/mhitu.c b/src/mhitu.c index 04fb991d9..54b83e128 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -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 */ diff --git a/src/muse.c b/src/muse.c index 43bf8c570..5de3adede 100644 --- a/src/muse.c +++ b/src/muse.c @@ -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) { diff --git a/src/pray.c b/src/pray.c index 4714d1531..75468cfb2 100644 --- a/src/pray.c +++ b/src/pray.c @@ -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(); diff --git a/src/uhitm.c b/src/uhitm.c index 3824654f4..c7169fe67 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -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 */