diff options
author | Alan Modra <amodra@gmail.com> | 2024-03-09 13:26:19 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2024-03-09 20:04:18 +1030 |
commit | 818bcf40efbee8784511ee8951c4c78328462582 (patch) | |
tree | f295b62c42ca83d726a0876afb14f78e0c34cb14 /bfd | |
parent | b9b7639c6fe09407fecdd43628cbd1d48dec5e22 (diff) | |
download | fsf-binutils-gdb-818bcf40efbee8784511ee8951c4c78328462582.zip fsf-binutils-gdb-818bcf40efbee8784511ee8951c4c78328462582.tar.gz fsf-binutils-gdb-818bcf40efbee8784511ee8951c4c78328462582.tar.bz2 |
print cached error messages using _bfd_error_handler
* format.c (print_warnmsg): Use _bfd_error_handler to print
cached messages.
(cherry picked from commit bd8d76258f86f93b20e6bd94f58033a49eb0d3ec)
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/format.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/bfd/format.c b/bfd/format.c index 47c3e9b..8f3fc7e 100644 --- a/bfd/format.c +++ b/bfd/format.c @@ -255,15 +255,8 @@ bfd_preserve_finish (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_preserve *preserve) static void print_warnmsg (struct per_xvec_message **list) { - fflush (stdout); - fprintf (stderr, "%s: ", _bfd_get_error_program_name ()); - for (struct per_xvec_message *warn = *list; warn; warn = warn->next) - { - fputs (warn->message, stderr); - fputc ('\n', stderr); - } - fflush (stderr); + _bfd_error_handler ("%s", warn->message); } static void |