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:
nethack.allison
2004-12-16 00:20:54 +00:00
parent 9bc23ab484
commit 28a1a41668
8 changed files with 38 additions and 38 deletions
+6 -6
View File
@@ -279,15 +279,15 @@ struct proto_dungeon *pd;
* or dungeon entrance can occupy.
*
* Note: This follows the acouple (instead of the rcouple) rules for a
* negative random component (rand < 0). These rules are found
* negative random component (randc < 0). These rules are found
* in dgn_comp.y. The acouple [absolute couple] section says that
* a negative random component means from the (adjusted) base to the
* end of the dungeon.
*/
STATIC_OVL int
level_range(dgn, base, rand, chain, pd, adjusted_base)
level_range(dgn, base, randc, chain, pd, adjusted_base)
xchar dgn;
int base, rand, chain;
int base, randc, chain;
struct proto_dungeon *pd;
int *adjusted_base;
{
@@ -308,11 +308,11 @@ level_range(dgn, base, rand, chain, pd, adjusted_base)
*adjusted_base = base;
if (rand == -1) { /* from base to end of dungeon */
if (randc == -1) { /* from base to end of dungeon */
return (lmax - base + 1);
} else if (rand) {
} else if (randc) {
/* make sure we don't run off the end of the dungeon */
return (((base + rand - 1) > lmax) ? lmax-base+1 : rand);
return (((base + randc - 1) > lmax) ? lmax-base+1 : randc);
} /* else only one choice */
return 1;
}