getargs: rename argument to avoid gnulib's renaming

With Clang 6.0:

      CC       src/bison-getargs.o
    bison/src/getargs.c:67:12: error: parameter 'option' not found in the
                               function declaration [-Werror,-Wdocumentation]
     *  \param option   option being decoded.
               ^~~~~~
    bison/src/getargs.c:67:12: note: did you mean 'rpl_option'?

* src/getargs.c: Don't use `option` as a documentation argument.
This commit is contained in:
Akim Demaille
2018-05-08 11:32:02 +02:00
parent 96748b2bf8
commit e1dd2807e6

View File

@@ -64,7 +64,7 @@ struct bison_language const *language = &valid_languages[0];
/** Decode an option's key. /** Decode an option's key.
* *
* \param option option being decoded. * \param opt option being decoded.
* \param keys array of valid subarguments. * \param keys array of valid subarguments.
* \param values array of corresponding (int) values. * \param values array of corresponding (int) values.
* \param all the all value. * \param all the all value.
@@ -79,11 +79,11 @@ struct bison_language const *language = &valid_languages[0];
* flags from \c all. Thus no-none = all and no-all = none. * flags from \c all. Thus no-none = all and no-all = none.
*/ */
static void static void
flag_argmatch (const char *option, flag_argmatch (const char *opt,
const char * const keys[], const int values[], const char *const keys[], const int values[],
int all, int *flags, char *arg, size_t no) int all, int *flags, char *arg, size_t no)
{ {
int value = XARGMATCH (option, arg + no, keys, values); int value = XARGMATCH (opt, arg + no, keys, values);
/* -rnone == -rno-all, and -rno-none == -rall. */ /* -rnone == -rno-all, and -rno-none == -rall. */
if (!value) if (!value)
@@ -100,7 +100,7 @@ flag_argmatch (const char *option,
/** Decode an option's set of keys. /** Decode an option's set of keys.
* *
* \param option option being decoded. * \param opt option being decoded (e.g., --report).
* \param keys array of valid subarguments. * \param keys array of valid subarguments.
* \param values array of corresponding (int) values. * \param values array of corresponding (int) values.
* \param all the all value. * \param all the all value.
@@ -109,7 +109,7 @@ flag_argmatch (const char *option,
* If 0, then activate all the flags. * If 0, then activate all the flags.
*/ */
static void static void
flags_argmatch (const char *option, flags_argmatch (const char *opt,
const char * const keys[], const int values[], const char * const keys[], const int values[],
int all, int *flags, char *args) int all, int *flags, char *args)
{ {
@@ -117,7 +117,7 @@ flags_argmatch (const char *option,
for (args = strtok (args, ","); args; args = strtok (NULL, ",")) for (args = strtok (args, ","); args; args = strtok (NULL, ","))
{ {
size_t no = STRPREFIX_LIT ("no-", args) ? 3 : 0; size_t no = STRPREFIX_LIT ("no-", args) ? 3 : 0;
flag_argmatch (option, keys, flag_argmatch (opt, keys,
values, all, flags, args, no); values, all, flags, args, no);
} }
else else