bfd/elf-properties: avoid shadowing a C library symbol
authorJan Beulich <jbeulich@novell.com>
Tue, 25 Jun 2019 10:01:50 +0000 (12:01 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 25 Jun 2019 10:01:50 +0000 (12:01 +0200)
With my (oldish) gcc/glibc combination I'm seeing

.../bfd/elf-properties.c: In function \91elf_find_and_remove_property\92:
.../bfd/elf-properties.c:244: error: declaration of \91remove\92 shadows a global declaration
/usr/include/stdio.h:157: error: shadowed declaration is here

bfd/ChangeLog
bfd/elf-properties.c

index d8cbef1bd1acaf9646f69b843b3a87040b06961e..0783242758acdaad7e27e00bbdbef0869fac9513 100644 (file)
@@ -1,3 +1,8 @@
+2019-06-25  Jan Beulich  <jbeulich@suse.com>
+
+       * elf-properties.c (elf_find_and_remove_property): Rename last
+       parameter. Mention it in comment.
+
 2019-06-24  Ilia Diachkov  <ilia.diachkov@optimitech.com>
 
        * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
index a297c9c5c24f291e1f0259551149f99eb08d9a59..198eece084346589c04057ea1f672487818cf85a 100644 (file)
@@ -236,12 +236,12 @@ elf_merge_gnu_properties (struct bfd_link_info *info, bfd *abfd, bfd *bbfd,
   return FALSE;
 }
 
-/* Return the property of TYPE on *LISTP and remove it from *LISTP.
-   Return NULL if not found.  */
+/* Return the property of TYPE on *LISTP and remove it from *LISTP if RM is
+   true.  Return NULL if not found.  */
 
 static elf_property *
 elf_find_and_remove_property (elf_property_list **listp,
-                             unsigned int type, bfd_boolean remove)
+                             unsigned int type, bfd_boolean rm)
 {
   elf_property_list *list;
 
@@ -250,7 +250,7 @@ elf_find_and_remove_property (elf_property_list **listp,
       if (type == list->property.pr_type)
        {
          /* Remove this property.  */
-         if (remove)
+         if (rm)
            *listp = list->next;
          return &list->property;
        }