shadowed declaration warning
<Someone> complained that his compiler was giving these
warnings:
cmd.c:2119: warning: declaration of `expl' shadows a global declaration
dungeon.c:292: warning: declaration of `rand' shadows a global declaration
exper.c💯 warning: declaration of `exp' shadows a global declaration
files.c:278: warning: declaration of `basename' shadows a global declaration
hack.c:1102: warning: declaration of `expl' shadows a global declaration
pickup.c:2081: warning: declaration of `select' shadows a global declaration
role.c:1060: warning: declaration of `conj' shadows a global declaration
This commit is contained in:
@@ -1132,17 +1132,17 @@ domove()
|
||||
if (context.forcefight ||
|
||||
/* remembered an 'I' && didn't use a move command */
|
||||
(glyph_is_invisible(levl[x][y].glyph) && !context.nopick)) {
|
||||
boolean expl = (Upolyd && attacktype(youmonst.data, AT_EXPL));
|
||||
boolean explo = (Upolyd && attacktype(youmonst.data, AT_EXPL));
|
||||
char buf[BUFSZ];
|
||||
Sprintf(buf,"a vacant spot on the %s", surface(x,y));
|
||||
You("%s %s.",
|
||||
expl ? "explode at" : "attack",
|
||||
explo ? "explode at" : "attack",
|
||||
!Underwater ? "thin air" :
|
||||
is_pool(x,y) ? "empty water" : buf);
|
||||
unmap_object(x, y); /* known empty -- remove 'I' if present */
|
||||
newsym(x, y);
|
||||
nomul(0);
|
||||
if (expl) {
|
||||
if (explo) {
|
||||
u.mh = -1; /* dead in the current form */
|
||||
rehumanize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user