bfd_set_input_error
authorPedro Alves <palves@redhat.com>
Wed, 4 Oct 2017 13:20:51 +0000 (14:20 +0100)
committerAlan Modra <amodra@gmail.com>
Thu, 5 Oct 2017 01:33:47 +0000 (12:03 +1030)
commit2ca7de3746be7484aa5affceafa1ad2e1d789381
tree3b828944d881259232614619db2108122a203880
parent7d36e2799141d206651410c68080f40b88809a3b
bfd_set_input_error

A downside to the 2017-10-04 PR22245 fix is that bfd_set_error can now
silently accept invalid errors if/when someone passes the a value of
the wrong enumeration type, which previously would be caught by the
-Wenum-conversion warning.

PR 22245
* bfd.c (bfd_set_error): Revert 2017-10-04 change.  Remove
ellipsis parameter.  Split out bfd_error_on_input code to..
(bfd_set_input_error): .. New function.
* archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
* vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
* bfd-in2.h: Regenerate.
bfd/ChangeLog
bfd/archive.c
bfd/bfd-in2.h
bfd/bfd.c
bfd/vms-lib.c