[BUILDROBOT] declaration of ‘link’ shadows a global declaration (was: [PATCH 1/3] avr/gas: Write out data to track .org/.align usage.)

Jan-Benedict Glaw jbglaw@lug-owl.de
Tue Mar 31 09:59:00 GMT 2015


Hi Andrew,

I'm a bit late on this one, but I just realized that there's a new
warning introduced, see build
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=432994.

On Fri, 2015-01-09 23:58:21 +0000, Andrew Burgess <andrew.burgess@embecosm.com> wrote:
> I have not added any tests with this patch as the second patch in this
> series adds pretty-printing support to objdump, making tests much
> easier to write.
> 
> Feedback welcome,
[...]
> diff --git a/gas/config/tc-avr.c b/gas/config/tc-avr.c
> index 19326a1..c8865f2 100644
> --- a/gas/config/tc-avr.c
> +++ b/gas/config/tc-avr.c
[...]
> +/* Create a property record for fragment FRAGP from section SEC and place
> +   it into an AVR_PROPERTY_RECORD_LINK structure, which can then formed
> +   into a linked list by the caller.  */
> +
> +static struct avr_property_record_link *
> +create_record_for_frag (segT sec, fragS *fragP)
> +{
> +  struct avr_property_record_link *link;
> +
> +  link = xmalloc (sizeof (struct avr_property_record_link));
> +  memset (link, 0, sizeof (*link));

gcc -DHAVE_CONFIG_H -I. -I/home/jbglaw/repos/binutils_gdb/gas  -I. -I/home/jbglaw/repos/binutils_gdb/gas -I../bfd -I/home/jbglaw/repos/binutils_gdb/gas/config -I/home/jbglaw/repos/binutils_gdb/gas/../include -I/home/jbglaw/repos/binutils_gdb/gas/.. -I/home/jbglaw/repos/binutils_gdb/gas/../bfd -DLOCALEDIR="\"/home/jbglaw/build/avr/_install_/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT tc-avr.o -MD -MP -MF .deps/tc-avr.Tpo -c -o tc-avr.o `test -f 'config/tc-avr.c' || echo '/home/jbglaw/repos/binutils_gdb/gas/'`config/tc-avr.c
cc1: warnings being treated as errors
/home/jbglaw/repos/binutils_gdb/gas/config/tc-avr.c: In function ‘create_record_for_frag’:
/home/jbglaw/repos/binutils_gdb/gas/config/tc-avr.c:2063: error: declaration of ‘link’ shadows a global declaration
/usr/include/unistd.h:806: error: shadowed declaration is here
make[3]: *** [tc-avr.o] Error 1

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:                     Eine Freie Meinung in einem Freien Kopf
the second  :                   für einen Freien Staat voll Freier Bürger.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20150331/8c073f63/attachment.sig>


More information about the Binutils mailing list