This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold commit] Add --debug=plugin option to record plugin actions
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Fri, 23 Mar 2018 23:00:06 -0700
- Subject: Re: [gold commit] Add --debug=plugin option to record plugin actions
- References: <CAJimCsEN6_GdeW3Nkix5gFsPH2F27So=4siD=TkWT+ntAp49nQ@mail.gmail.com> <20180324022429.GV3812@bubble.grove.modra.org>
> 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