[PATCH] Fixes for a small number of compiler warnings
H.J. Lu
hjl.tools@gmail.com
Fri Mar 27 13:05:00 GMT 2015
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.
More information about the Binutils
mailing list