From: Jan Beulich Date: Tue, 25 Jun 2019 09:08:53 +0000 (+0200) Subject: objdump: avoid shadowing a libiberty symbol X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63160fc99678fd85311ad5c89494164e6f8439d7;p=binutils-gdb.git objdump: avoid shadowing a libiberty symbol 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 --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index b9e125fd614..611fc9b3205 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2019-06-25 Jan Beulich + + * objdump.c (dump_ctf_indent_lines): Rename local variable + "spaces" to "blanks". + 2019-06-14 Alan Modra * Makefile.in: Regenerate. diff --git a/binutils/objdump.c b/binutils/objdump.c index d9c8cea3649..7a4e7e4b494 100644 --- 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; + const char *blanks = arg; char *new_s; - if (asprintf (&new_s, "%s%s", spaces, s) < 0) + if (asprintf (&new_s, "%s%s", blanks, s) < 0) return s; return new_s; }