mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-26 15:22:25 +08:00
gdb: remove unused parameters in print_doc_of_command, apropos_cmd
I noticed the prefix parameter was unused in print_doc_of_command. And when removing it, it becomes unused in apropos_cmd. Change-Id: Id72980b03fe091b22931e6b85945f412b274ed5e
This commit is contained in:
@ -1768,7 +1768,7 @@ apropos_command (const char *arg, int from_tty)
|
|||||||
compiled_regex pattern (arg, REG_ICASE,
|
compiled_regex pattern (arg, REG_ICASE,
|
||||||
_("Error in regular expression"));
|
_("Error in regular expression"));
|
||||||
|
|
||||||
apropos_cmd (gdb_stdout, cmdlist, verbose, pattern, "");
|
apropos_cmd (gdb_stdout, cmdlist, verbose, pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The options for the "alias" command. */
|
/* The options for the "alias" command. */
|
||||||
|
@ -1637,9 +1637,8 @@ fput_command_names_styled (const cmd_list_element &c,
|
|||||||
otherwise print only one-line help for command C. */
|
otherwise print only one-line help for command C. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_doc_of_command (const cmd_list_element &c, const char *prefix,
|
print_doc_of_command (const cmd_list_element &c, bool verbose,
|
||||||
bool verbose, compiled_regex &highlight,
|
compiled_regex &highlight, struct ui_file *stream)
|
||||||
struct ui_file *stream)
|
|
||||||
{
|
{
|
||||||
/* When printing the full documentation, add a line to separate
|
/* When printing the full documentation, add a line to separate
|
||||||
this documentation from the previous command help, in the likely
|
this documentation from the previous command help, in the likely
|
||||||
@ -1674,7 +1673,7 @@ print_doc_of_command (const cmd_list_element &c, const char *prefix,
|
|||||||
void
|
void
|
||||||
apropos_cmd (struct ui_file *stream,
|
apropos_cmd (struct ui_file *stream,
|
||||||
struct cmd_list_element *commandlist,
|
struct cmd_list_element *commandlist,
|
||||||
bool verbose, compiled_regex ®ex, const char *prefix)
|
bool verbose, compiled_regex ®ex)
|
||||||
{
|
{
|
||||||
struct cmd_list_element *c;
|
struct cmd_list_element *c;
|
||||||
int returnvalue;
|
int returnvalue;
|
||||||
@ -1698,7 +1697,7 @@ apropos_cmd (struct ui_file *stream,
|
|||||||
/* Try to match against the name. */
|
/* Try to match against the name. */
|
||||||
returnvalue = regex.search (c->name, name_len, 0, name_len, NULL);
|
returnvalue = regex.search (c->name, name_len, 0, name_len, NULL);
|
||||||
if (returnvalue >= 0)
|
if (returnvalue >= 0)
|
||||||
print_doc_of_command (*c, prefix, verbose, regex, stream);
|
print_doc_of_command (*c, verbose, regex, stream);
|
||||||
|
|
||||||
/* Try to match against the name of the aliases. */
|
/* Try to match against the name of the aliases. */
|
||||||
for (const cmd_list_element &alias : c->aliases)
|
for (const cmd_list_element &alias : c->aliases)
|
||||||
@ -1707,7 +1706,7 @@ apropos_cmd (struct ui_file *stream,
|
|||||||
returnvalue = regex.search (alias.name, name_len, 0, name_len, NULL);
|
returnvalue = regex.search (alias.name, name_len, 0, name_len, NULL);
|
||||||
if (returnvalue >= 0)
|
if (returnvalue >= 0)
|
||||||
{
|
{
|
||||||
print_doc_of_command (*c, prefix, verbose, regex, stream);
|
print_doc_of_command (*c, verbose, regex, stream);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1718,15 +1717,14 @@ apropos_cmd (struct ui_file *stream,
|
|||||||
|
|
||||||
/* Try to match against documentation. */
|
/* Try to match against documentation. */
|
||||||
if (regex.search (c->doc, doc_len, 0, doc_len, NULL) >= 0)
|
if (regex.search (c->doc, doc_len, 0, doc_len, NULL) >= 0)
|
||||||
print_doc_of_command (*c, prefix, verbose, regex, stream);
|
print_doc_of_command (*c, verbose, regex, stream);
|
||||||
}
|
}
|
||||||
/* Check if this command has subcommands. */
|
/* Check if this command has subcommands. */
|
||||||
if (c->is_prefix ())
|
if (c->is_prefix ())
|
||||||
{
|
{
|
||||||
/* Recursively call ourselves on the subcommand list,
|
/* Recursively call ourselves on the subcommand list,
|
||||||
passing the right prefix in. */
|
passing the right prefix in. */
|
||||||
apropos_cmd (stream, *c->subcommands, verbose, regex,
|
apropos_cmd (stream, *c->subcommands, verbose, regex);
|
||||||
c->prefixname ().c_str ());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ private:
|
|||||||
extern void help_cmd (const char *, struct ui_file *);
|
extern void help_cmd (const char *, struct ui_file *);
|
||||||
|
|
||||||
extern void apropos_cmd (struct ui_file *, struct cmd_list_element *,
|
extern void apropos_cmd (struct ui_file *, struct cmd_list_element *,
|
||||||
bool verbose, compiled_regex &, const char *);
|
bool verbose, compiled_regex &);
|
||||||
|
|
||||||
/* Used to mark commands that don't do anything. If we just leave the
|
/* Used to mark commands that don't do anything. If we just leave the
|
||||||
function field NULL, the command is interpreted as a help topic, or
|
function field NULL, the command is interpreted as a help topic, or
|
||||||
|
Reference in New Issue
Block a user