From b3ea2010cd06d49dd4fbfaa64b055700f7869e34 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 22 Aug 2022 16:19:17 +0100 Subject: [PATCH] Fix compile time warning from Clang about error messages not being printed safely. --- 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; } } -- 2.30.2