Fix uses of strerror in diagnostics

Gabriel Dos Reis gdr@integrable-solutions.net
Fri May 28 14:31:00 GMT 2010


On Fri, May 28, 2010 at 7:54 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> This patch fixes issues I noticed while planning the conversion of the
> driver to use the common diagnostic infrastructure.  The common
> diagnostics code supports %m to print strerror (errno); code using
> that infrastructure should be using %m instead of calling strerror
> itself.  Furthermore, libiberty provides an xstrerror wrapper and any
> code that can't use %m should be using xstrerror rather than strerror
> directly.  In the case of lto-coff.c and lto-macho.c, coff_errmsg and
> mach_o_errmsg were only ever called with -1 as argument; they appear
> to be useless abstractions at present and I removed them and changed
> the callers to use %m.
>
> Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  OK to
> commit?
>
yes.



More information about the Gcc-patches mailing list