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: [PATCH] Fixes for a small number of compiler warnings


Hi,

Earlier today I tried to reply to this conversation from my phone, but
it seems my email bounced because it used HTML. Second attempt.

2015-04-01 13:08 GMT+02:00 H.J. Lu <hjl.tools@gmail.com>:
> I don't think there is a perfect solution. But I don't want to turn off
> -Werror for older GCC.

We could consider using a memset call instead of attempting to use an
initializer list:

struct bfd_link_hash_entry ehdr_start_save;
memset(&ehdr_start_save, 0, sizeof(ehdr_start_save));

That way both compiler warnings (self-initialization and incomplete
initializer list) are suppressed. It would make sense to put a comment
next to it, so we don't forget to remove it in the very far future:

/* memset() to keep GCC < 4.n happy. */

-- 
Ed Schouten <ed@nuxi.nl>


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