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,
^~~~~~
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;
{
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