projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e5a28b
)
bfd_nonfatal_message, localise va_start
author
Alan Modra
<amodra@gmail.com>
Mon, 25 Oct 2021 05:12:40 +0000
(15:42 +1030)
committer
Alan Modra
<amodra@gmail.com>
Mon, 25 Oct 2021 06:17:36 +0000
(16:47 +1030)
Nothing to see here, just a little tidier.
* bucomm.c (bfd_nonfatal_message): Localise va_list args.
binutils/bucomm.c
patch
|
blob
|
history
diff --git
a/binutils/bucomm.c
b/binutils/bucomm.c
index 8ce66ab8cce7b6520ff7f3cada33fb7632c64a3f..655bb5d35fb8236d709711d09089cae1402f016a 100644
(file)
--- a/
binutils/bucomm.c
+++ b/
binutils/bucomm.c
@@
-70,7
+70,6
@@
bfd_nonfatal_message (const char *filename,
{
const char *errmsg;
const char *section_name;
- va_list args;
enum bfd_error err = bfd_get_error ();
if (err == bfd_error_no_error)
@@
-79,7
+78,6
@@
bfd_nonfatal_message (const char *filename,
errmsg = bfd_errmsg (err);
fflush (stdout);
section_name = NULL;
- va_start (args, format);
fprintf (stderr, "%s", program_name);
if (abfd)
@@
-96,11
+94,13
@@
bfd_nonfatal_message (const char *filename,
if (format)
{
+ va_list args;
+ va_start (args, format);
fprintf (stderr, ": ");
vfprintf (stderr, format, args);
+ va_end (args);
}
fprintf (stderr, ": %s\n", errmsg);
- va_end (args);
}
void