clear a -Wshadow warning in options.c

options.c
options.c: In function ‘match_optname’:
options.c:5734:27: warning: declaration of ‘opt_name’ shadows a global declaration [-Wshadow]
 const char *user_string, *opt_name;
                           ^~~~~~~~
In file included from options.c:52:0:
../include/optlist.h:56:1: note: shadowed declaration is here
 opt_##a,
 ^
../include/optlist.h:307:5: note: in expansion of macro ‘NHOPTC’
     NHOPTC(name, PL_NSIZ, opt_in, set_gameview, No, Yes, No, No, NoAlias,
     ^~~~~~
This commit is contained in:
nhmall
2020-10-05 09:24:42 -04:00
parent ab5c8dff05
commit 43112cec01

View File

@@ -5730,8 +5730,8 @@ int len;
substring of a particular option name; option string might have
a colon or equals sign and arbitrary value appended to it */
boolean
match_optname(user_string, opt_name, min_length, val_allowed)
const char *user_string, *opt_name;
match_optname(user_string, optn_name, min_length, val_allowed)
const char *user_string, *optn_name;
int min_length;
boolean val_allowed;
{
@@ -5741,7 +5741,7 @@ boolean val_allowed;
len = length_without_val(user_string, len);
return (boolean) (len >= min_length
&& !strncmpi(opt_name, user_string, len));
&& !strncmpi(optn_name, user_string, len));
}
void