readelf: avoid shadowing a libiberty symbol
authorJan Beulich <jbeulich@novell.com>
Tue, 25 Jun 2019 09:09:22 +0000 (11:09 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 25 Jun 2019 09:09:22 +0000 (11:09 +0200)
With my (oldish) gcc I'm seeing

.../binutils/readelf.c: In function \91dump_ctf_indent_lines\92:
.../binutils/readelf.c:13851: error: declaration of \91spaces\92 shadows a global declaration
.../binutils/../include/libiberty.h:253: error: shadowed declaration is here

binutils/ChangeLog
binutils/readelf.c

index 611fc9b32056bbc9ee84160e4cb9d202161bd854..63822e40a9d577e5b88fab11789815b1f11b1765 100644 (file)
@@ -1,3 +1,8 @@
+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
index 4ed948c651eaee865667ddfc360a4828ba028cce..5e8fe824b3e4f395015c867ffc21fb80308a81f1 100644 (file)
@@ -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;
 }
This page took 0.031604 seconds and 4 git commands to generate.