diff options
author | Alan Modra <amodra@gmail.com> | 2024-03-09 13:26:19 +1030 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2024-04-07 00:37:36 +0200 |
commit | ff843986fa4d2b08a22c0d97bc8c25c051755207 (patch) | |
tree | 5de254c17f831c9924cb3ba22ffa91e800fda26a | |
parent | aarch64: Fix the 2nd operand in gcsstr and gcssttr instructions. (diff) | |
download | binutils-gdb-ff843986fa4d2b08a22c0d97bc8c25c051755207.tar.gz binutils-gdb-ff843986fa4d2b08a22c0d97bc8c25c051755207.tar.bz2 binutils-gdb-ff843986fa4d2b08a22c0d97bc8c25c051755207.zip |
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)
(cherry picked from commit 818bcf40efbee8784511ee8951c4c78328462582)
-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 47c3e9ba35a..8f3fc7e7b96 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 |