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

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

binutils/ChangeLog
binutils/objdump.c

index b9e125fd614d6ff14c0270d7a8c2084b6f74cc6b..611fc9b32056bbc9ee84160e4cb9d202161bd854 100644 (file)
@@ -1,3 +1,8 @@
+2019-06-25  Jan Beulich  <jbeulich@suse.com>
+
+       * objdump.c (dump_ctf_indent_lines): Rename local variable
+       "spaces" to "blanks".
+
 2019-06-14  Alan Modra  <amodra@gmail.com>
 
        * Makefile.in: Regenerate.
index d9c8cea36491d8f6f400f2ecde028055d9d79d42..7a4e7e4b494a0607418bd442aa2bfeb675e73dbb 100644 (file)
@@ -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;
 }