aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2019-06-25 11:09:22 +0200
committerJan Beulich <jbeulich@suse.com>2019-06-25 11:09:22 +0200
commit3e50a591d9f0c0b22bbf93d09eef7d2286f3716c (patch)
treefbd150461ae44ea3875297bbd69f2f9cb580dcec
parent63160fc99678fd85311ad5c89494164e6f8439d7 (diff)
downloadgdb-3e50a591d9f0c0b22bbf93d09eef7d2286f3716c.zip
gdb-3e50a591d9f0c0b22bbf93d09eef7d2286f3716c.tar.gz
gdb-3e50a591d9f0c0b22bbf93d09eef7d2286f3716c.tar.bz2
readelf: avoid shadowing a libiberty symbol
With my (oldish) gcc I'm seeing .../binutils/readelf.c: In function ‘dump_ctf_indent_lines’: .../binutils/readelf.c:13851: error: declaration of ‘spaces’ shadows a global declaration .../binutils/../include/libiberty.h:253: error: shadowed declaration is here
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/readelf.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 611fc9b..63822e4 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,10 @@
2019-06-25 Jan Beulich <jbeulich@suse.com>
+ * readelf.c (dump_ctf_indent_lines): Rename local variable
+ "spaces" to "blanks".
+
+2019-06-25 Jan Beulich <jbeulich@suse.com>
+
* objdump.c (dump_ctf_indent_lines): Rename local variable
"spaces" to "blanks".
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 4ed948c..5e8fe82 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -13848,10 +13848,10 @@ shdr_to_ctf_sect (ctf_sect_t *buf, Elf_Internal_Shdr *shdr, Filedata *filedata)
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;
}