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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user