This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] 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

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;
   char *new_s;
 
-  if (asprintf (&new_s, "%s%s", spaces, s) < 0)
+  if (asprintf (&new_s, "%s%s", spcs, s) < 0)
     return s;
   return new_s;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]