static analyzer lint for dig.c, do.c
This commit is contained in:
@@ -1642,6 +1642,7 @@ zap_dig(void)
|
|||||||
if (diridx != DIR_ERR
|
if (diridx != DIR_ERR
|
||||||
&& !conjoined_pits(adjpit, trap_with_u, FALSE)) {
|
&& !conjoined_pits(adjpit, trap_with_u, FALSE)) {
|
||||||
digdepth = 0; /* limited to the adjacent location only */
|
digdepth = 0; /* limited to the adjacent location only */
|
||||||
|
nhUse(digdepth);
|
||||||
if (!(adjpit && is_pit(adjpit->ttyp))) {
|
if (!(adjpit && is_pit(adjpit->ttyp))) {
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 do.c $NHDT-Date: 1704225560 2024/01/02 19:59:20 $ $NHDT-Branch: keni-luabits2 $:$NHDT-Revision: 1.376 $ */
|
/* NetHack 3.7 do.c $NHDT-Date: 1737287889 2025/01/19 03:58:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.399 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -224,6 +224,7 @@ flooreffects(
|
|||||||
}
|
}
|
||||||
if (!DEADMONSTER(mtmp) && !is_whirly(mtmp->data))
|
if (!DEADMONSTER(mtmp) && !is_whirly(mtmp->data))
|
||||||
res = FALSE; /* still alive, boulder still intact */
|
res = FALSE; /* still alive, boulder still intact */
|
||||||
|
nhUse(res);
|
||||||
}
|
}
|
||||||
mtmp->mtrapped = 0;
|
mtmp->mtrapped = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user