[binutils-gdb] bfd: avoid "shadowing" of glibc function name
Jan Beulich
jbeulich@sourceware.org
Tue Mar 23 07:44:46 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f596b03f555fa4e473bd3fbeb0d7b6662883485b
commit f596b03f555fa4e473bd3fbeb0d7b6662883485b
Author: Jan Beulich <jbeulich@suse.com>
Date: Tue Mar 23 08:42:58 2021 +0100
bfd: avoid "shadowing" of glibc function name
Old enough glibc has an (unguarded) declaration of index() in string.h,
which triggers a "shadows a global declaration" warning.
Diff:
---
bfd/ChangeLog | 4 ++++
bfd/dwarf2.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c4172ebe5e3..3245f8c5ad3 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2021-03-23 Jan Beulich <jbeulich@suse.com>
+
+ * dwarf2.c (read_indexed_string): Rename index to idx.
+
2021-03-22 Martin Liska <mliska@suse.cz>
* bfd-in.h (startswith): Add startswith function.
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 9f895b1a20a..dbaec4016c1 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -1172,7 +1172,7 @@ is_str_attr (enum dwarf_form form)
}
static const char *
-read_indexed_string (bfd_uint64_t index ATTRIBUTE_UNUSED,
+read_indexed_string (bfd_uint64_t idx ATTRIBUTE_UNUSED,
struct comp_unit * unit ATTRIBUTE_UNUSED)
{
/* FIXME: Add support for indexed strings. */
More information about the Binutils-cvs
mailing list