STATIC_PTR int
wiz_smell(VOID_ARGS)
{
- char out_str[BUFSZ];
- struct permonst *pm = 0;
int ans = 0;
int mndx; /* monster index */
- int found; /* count of matching mndxs found */
coord cc; /* screen pos of unknown glyph */
int glyph; /* glyph at selected position */
pline("You can move the cursor to a monster that you want to smell.");
do {
- /* Reset some variables. */
- pm = (struct permonst *)0;
- found = 0;
- out_str[0] = '\0';
-
pline("Pick a monster to smell.");
ans = getpos(&cc, TRUE, "a monster");
if (ans < 0 || cc.x < 0) {
struct monst *mtmp;
struct obj *otmp;
struct trap *trap_with_u = (struct trap *)0;
- int zx, zy, diridx, digdepth, flow_x, flow_y;
+ int zx, zy, diridx = 8, digdepth, flow_x = -1, flow_y = -1;
boolean shopdoor, shopwall, maze_dig, pitdig = FALSE, pitflow = FALSE;
/*
} /* while */
tmp_at(DISP_END,0); /* closing call */
- if (pitflow) {
+ if (pitflow && isok(flow_x, flow_y)) {
struct trap *ttmp = t_at(flow_x, flow_y);
if (ttmp && (ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT)) {
schar filltyp = fillholetyp(ttmp->tx, ttmp->ty, TRUE);
* probably because the level is full.
* Dump the monster's cargo and leave the monster dead.
*/
- struct obj *obj, *corpse;
+ struct obj *obj;
while ((obj = mtmp->minvent) != 0) {
obj_extract_self(obj);
obj_no_longer_held(obj);
impossible("Can't find relocated object.");
}
}
- corpse = mkcorpstat(CORPSE, (struct monst *)0, mtmp->data,
+ (void) mkcorpstat(CORPSE, (struct monst *)0, mtmp->data,
xlocale, ylocale, CORPSTAT_NONE);
mongone(mtmp);
}
{
struct monst *mon;
register int sx,sy,i;
- int sh, tx, ty, goldlim, type = sroom->rtype;
+ int sh, tx = 0, ty = 0, goldlim = 0, type = sroom->rtype;
int rmno = (int)((sroom - rooms) + ROOMOFFSET);
coord mm;
-#ifdef GCC_WARN
- tx = ty = goldlim = 0;
-#endif
-
sh = sroom->fdoor;
switch(type) {
case COURT:
const char *objphrase; /* "Your widget glows" or "Steed's saddle glows" */
{
void FDECL((*func), (OBJ_P)) = 0;
- const char *how = 0, *glowcolor = 0;
+ const char *glowcolor = 0;
#define COST_alter (-2)
#define COST_none (-1)
int costchange = COST_none;
if (!potion || potion->otyp != POT_WATER) return FALSE;
if (potion->blessed) {
- how = "softly glow";
if (targobj->cursed) {
func = uncurse;
glowcolor = NH_AMBER;
altfmt = TRUE; /* "with a <color> aura" */
}
} else if (potion->cursed) {
- how = "glow";
if (targobj->blessed) {
func = unbless;
glowcolor = "brown";
{
char buf[BUFSZ], *bufp, monclass;
int which, tryct, i, firstchoice = NON_PM;
- struct permonst *whichpm;
+ struct permonst *whichpm = NULL;
struct monst *mtmp;
boolean madeany = FALSE;
boolean maketame, makepeaceful, makehostile;
int fd;
char *plbuf;
{
- int rlen, pltmpsiz = 0;
- rlen = read(fd, (genericptr_t) &pltmpsiz, sizeof(pltmpsiz));
- rlen = read(fd, (genericptr_t) plbuf, pltmpsiz);
+ int pltmpsiz = 0;
+ (void) read(fd, (genericptr_t) &pltmpsiz, sizeof(pltmpsiz));
+ (void) read(fd, (genericptr_t) plbuf, pltmpsiz);
return;
}
{
struct monst *steed = u.usteed;
int tt;
- boolean in_sight, trapkilled, steedhit;
+ boolean trapkilled, steedhit;
if (!steed || !trap) return 0;
tt = trap->ttyp;
steed->mx = u.ux;
steed->my = u.uy;
- in_sight = !Blind;
trapkilled = steedhit = FALSE;
switch (tt) {
boolean *noticed; /* set to true iff hero notices the effect; */
{ /* otherwise left with its previous value intact */
struct trap *t;
- boolean ishero = (mon == &youmonst), result;
+ boolean ishero = (mon == &youmonst);
if (mon == u.usteed) ishero = TRUE;
t = t_at(ishero ? u.ux : mon->mx, ishero ? u.uy : mon->my);
if (u.utrap) return FALSE; /* already trapped */
*noticed = TRUE;
dotrap(t, FORCETRAP);
- result = (u.utrap != 0);
} else {
if (mon->mtrapped) return FALSE; /* already trapped */
/* you notice it if you see the trap close/tremble/whatever
/* monster will be angered; mintrap doesn't handle that */
wakeup(mon);
++force_mintrap;
- result = (mintrap(mon) != 0);
--force_mintrap;
/* mon might now be on the migrating monsters list */
}