Reduce explicit use of gdb_stdout
In an earlier version of the pager rewrite series, it was important to audit unfiltered output calls to see which were truly necessary. This is no longer necessary, but it still seems like a decent cleanup to change calls to avoid explicitly passing gdb_stdout. That is, rather than using something like fprintf_unfiltered with gdb_stdout, the code ought to use plain printf_unfiltered instead. This patch makes this change. I went ahead and converted all the _filtered calls I could find, as well, for the same clarity.
This commit is contained in:
parent
244ac24b51
commit
d4396e0e97
20 changed files with 109 additions and 127 deletions
|
@ -37,9 +37,8 @@ static unsigned int nr_failed_invariants;
|
|||
static void
|
||||
broken_doc_invariant (const char *prefix, const char *name, const char *msg)
|
||||
{
|
||||
fprintf_filtered (gdb_stdout,
|
||||
"help doc broken invariant: command '%s%s' help doc %s\n",
|
||||
prefix, name, msg);
|
||||
printf_filtered ("help doc broken invariant: command '%s%s' help doc %s\n",
|
||||
prefix, name, msg);
|
||||
nr_failed_invariants++;
|
||||
}
|
||||
|
||||
|
@ -130,13 +129,12 @@ traverse_command_structure (struct cmd_list_element **list,
|
|||
auto dupl = lists.find (list);
|
||||
if (dupl != lists.end ())
|
||||
{
|
||||
fprintf_filtered (gdb_stdout,
|
||||
"list %p duplicated,"
|
||||
" reachable via prefix '%s' and '%s'."
|
||||
" Duplicated list first command is '%s'\n",
|
||||
list,
|
||||
prefix, dupl->second,
|
||||
(*list)->name);
|
||||
printf_filtered ("list %p duplicated,"
|
||||
" reachable via prefix '%s' and '%s'."
|
||||
" Duplicated list first command is '%s'\n",
|
||||
list,
|
||||
prefix, dupl->second,
|
||||
(*list)->name);
|
||||
nr_duplicates++;
|
||||
return;
|
||||
}
|
||||
|
@ -165,17 +163,15 @@ traverse_command_structure (struct cmd_list_element **list,
|
|||
|| (prefixcmd == nullptr && *list != cmdlist))
|
||||
{
|
||||
if (c->prefix == nullptr)
|
||||
fprintf_filtered (gdb_stdout,
|
||||
"list %p reachable via prefix '%s'."
|
||||
" command '%s' has null prefixcmd\n",
|
||||
list,
|
||||
prefix, c->name);
|
||||
printf_filtered ("list %p reachable via prefix '%s'."
|
||||
" command '%s' has null prefixcmd\n",
|
||||
list,
|
||||
prefix, c->name);
|
||||
else
|
||||
fprintf_filtered (gdb_stdout,
|
||||
"list %p reachable via prefix '%s'."
|
||||
" command '%s' has a different prefixcmd\n",
|
||||
list,
|
||||
prefix, c->name);
|
||||
printf_filtered ("list %p reachable via prefix '%s'."
|
||||
" command '%s' has a different prefixcmd\n",
|
||||
list,
|
||||
prefix, c->name);
|
||||
nr_invalid_prefixcmd++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue