forked from Imagelibrary/binutils-gdb
Change return type of ui_out redirect to void
All implementations of redirect/do_redirect in the ui_out subsystem always return 0 (success). We can therefore clean it up and make them return void. gdb/ChangeLog: * cli-out.c (cli_ui_out::do_redirect): Change return type to void. * cli-out.h (cli_ui_out::do_redirect): Likewise. * mi/mi-out.c (mi_ui_out::do_redirect): Likewise. * mi/mi-out.h (mi_ui_out::do_redirect): Likewise. * ui-out.c (ui_out::redirect): Likewise. * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise. * cli/cli-logging.c (set_logging_redirect): Update call site of ui_out::redirect. (handle_redirections): Likewise. * scm-ports.c (ioscm_with_output_to_port_worker): Likewise. * top.c (execute_command_to_string): Likewise. * utils.c (do_ui_out_redirect_pop): Likewise.
This commit is contained in:
@@ -227,15 +227,13 @@ cli_ui_out::do_flush ()
|
||||
and make it therefore active. OUTSTREAM as NULL will pop the last pushed
|
||||
output stream; it is an internal error if it does not exist. */
|
||||
|
||||
int
|
||||
void
|
||||
cli_ui_out::do_redirect (ui_file *outstream)
|
||||
{
|
||||
if (outstream != NULL)
|
||||
m_streams.push_back (outstream);
|
||||
else
|
||||
m_streams.pop_back ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* local functions */
|
||||
|
||||
Reference in New Issue
Block a user