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

View File

@@ -1057,13 +1057,13 @@ promptsep(buf, num_post_attribs)
char *buf;
int num_post_attribs;
{
const char *conj = "and ";
const char *conjuct = "and ";
if (num_post_attribs > 1
&& post_attribs < num_post_attribs && post_attribs > 1)
Strcat(buf, ",");
Strcat(buf, " ");
--post_attribs;
if (!post_attribs && num_post_attribs > 1) Strcat(buf, conj);
if (!post_attribs && num_post_attribs > 1) Strcat(buf, conjuct);
return buf;
}