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


On Thu, Mar 26, 2015 at 11:01 PM, Ed Schouten <ed@nuxi.nl> wrote:
> 2015-03-27 1:07 GMT+01:00 Alan Modra <amodra@gmail.com>:
>> This was last changed by commit f9c316c4, which says
>>     Silence uninitialized warning on ehdr_start_save
>>
>>     Older GCC, like 4.1/4.2, will issue an uninitialized warning on
>>     ehdr_start_save.  This patch silences by using
>>
>>     struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
>>
>> Blah.  A warning fix for an older gcc that causes a warning in a
>> newer compiler.
>
> Ah, I see. Still, no problem. We can just zero-initialize it. Attached
> is an updated patch.
>

I think we should add a micro

#define SILENCE_UNIITITALIZED_WARNING(var) ....

and do

struct bfd_link_hash_entry ehdr_start_save =
  SILENCE_UNIITITALIZED_WARNING (save);


-- 
H.J.


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