From: Jan Beulich Date: Tue, 23 Mar 2021 07:42:58 +0000 (+0100) Subject: bfd: avoid "shadowing" of glibc function name X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f596b03f555fa4e473bd3fbeb0d7b6662883485b;p=binutils-gdb.git 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 --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 + + * dwarf2.c (read_indexed_string): Rename index to idx. + 2021-03-22 Martin Liska * 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. */