This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold commit] Add --debug=plugin option to record plugin actions


> No ChangeLog committed, and

Oops, sorry!

> /home/alan/src/binutils-gdb/gold/plugin.cc: In function ‘bool gold::link_or_copy_file(const char*, const char*)’:
> /home/alan/src/binutils-gdb/gold/plugin.cc:583:5: error: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Werror=unused-result]
>      static_cast<void>(::write(out, buf, len));
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1plus: all warnings being treated as errors

I'm not seeing this, even with a fairly recent GCC 8.

Grrrr. I truly do not care about the return value from this call.
That's why I cast the friggin' result to void. It's not a security
problem, and it's not a bug. I'll just find a truncated copy of the
replacement file in my debugging output directory. It'll serve me
right for running out of space or whatever. #policestatecompilers

-cary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]