From: Nick Clifton <nickc@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] Fix compile time warning from Clang about error messages not being printed safely.
Date: Mon, 22 Aug 2022 15:19:54 +0000 (GMT) [thread overview]
Message-ID: <20220822151954.32F3F3858D32@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b3ea2010cd06d49dd4fbfaa64b055700f7869e34
commit b3ea2010cd06d49dd4fbfaa64b055700f7869e34
Author: Nick Clifton <nickc@redhat.com>
Date: Mon Aug 22 16:19:17 2022 +0100
Fix compile time warning from Clang about error messages not being printed safely.
Diff:
---
binutils/readelf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/binutils/readelf.c b/binutils/readelf.c
index b6301660b75..cafba9a4f56 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -5735,9 +5735,9 @@ check_magic_number (Filedata * filedata, Elf_Internal_Ehdr * header)
so we provide two different kinds of error message. */
if (filedata->archive_file_size > 0
&& known_magic[i].ar_message != NULL)
- error (known_magic[i].ar_message);
+ error ("%s", known_magic[i].ar_message);
else
- error (known_magic[i].obj_message);
+ error ("%s", known_magic[i].obj_message);
return false;
}
}
reply other threads:[~2022-08-22 15:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220822151954.32F3F3858D32@sourceware.org \
--to=nickc@sourceware.org \
--cc=bfd-cvs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).