This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] objdump: avoid shadowing a libiberty symbol
- From: Nick Alcock <nick dot alcock at oracle dot com>
- To: "Jan Beulich" <JBeulich at suse dot com>
- Cc: <binutils at sourceware dot org>
- Date: Mon, 24 Jun 2019 20:31:08 +0100
- Subject: Re: [PATCH] objdump: avoid shadowing a libiberty symbol
- References: <5D10C600020000780023A9E9@prv1-mh.provo.novell.com>
On 24 Jun 2019, Jan Beulich outgrape:
> With my (oldish) gcc I'm seeing
>
> .../binutils/objdump.c: In function ‘dump_ctf_indent_lines’:
> .../binutils/objdump.c:3210: error: declaration of ‘spaces’ shadows a global declaration
> .../binutils/../include/libiberty.h:253: error: shadowed declaration is here
Oof. Sorry about that.
> binutils/
> 2019-06-24 Jan Beulich <jbeulich@suse.com>
>
> * objdump.c (dump_ctf_indent_lines): Rename local variable
> "spaces" to "spcs".
>
> --- a/binutils/objdump.c
> +++ b/binutils/objdump.c
> @@ -3207,10 +3207,10 @@ static char *
> dump_ctf_indent_lines (ctf_sect_names_t sect ATTRIBUTE_UNUSED,
> char *s, void *arg)
> {
> - char *spaces = arg;
> + char *spcs = arg;
Hm. "blanks" might be a better name?
--
NULL && (void)