From: Nick Clifton Date: Mon, 22 Aug 2022 15:19:17 +0000 (+0100) Subject: Fix compile time warning from Clang about error messages not being printed safely. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3ea2010cd06d49dd4fbfaa64b055700f7869e34;p=binutils-gdb.git Fix compile time warning from Clang about error messages not being printed safely. --- 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; } }