Fix compile time warning from Clang about error messages not being printed safely.

This commit is contained in:
Nick Clifton
2022-08-22 16:19:17 +01:00
parent 521f726815
commit b3ea2010cd

View File

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