bfd: avoid "shadowing" of glibc function name

Message ID ce8e281d-3932-cbc3-f9ab-bbc8afd50ecb@suse.com
State New
Headers show
Series
  • bfd: avoid "shadowing" of glibc function name
Related show

Commit Message

H.J. Lu via Binutils March 22, 2021, 8:30 a.m.
Old enough glibc has an (unguarded) declaration of index() in string.h,
which triggers a "shadows a global declaration" warning.

bfd/
2021-03-XX  Jan Beulich  <jbeulich@suse.com>

	* dwarf2.c (read_indexed_string): Rename index to idx.

Comments

H.J. Lu via Binutils March 22, 2021, 12:49 p.m. | #1
On Mon, Mar 22, 2021 at 09:30:48AM +0100, Jan Beulich via Binutils wrote:
> 	* dwarf2.c (read_indexed_string): Rename index to idx.


OK.

-- 
Alan Modra
Australia Development Lab, IBM

Patch

--- 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.  */