public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] Fix compile time warning from Clang about error messages not being printed safely.
@ 2022-08-22 15:19 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2022-08-22 15:19 UTC (permalink / raw)
  To: bfd-cvs

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;
 	}
     }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-22 15:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-22 15:19 [binutils-gdb] Fix compile time warning from Clang about error messages not being printed safely Nick Clifton

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).