bfd/dwarf2.c: Fix a typo issue related with commit 60d77146a249ae9b51d7ce98930cdbedb2cfa352

Message ID 53FAFC9A.5000200@gmail.com
State New, archived
Headers

Commit Message

Chen Gang Aug. 25, 2014, 9:06 a.m. UTC
  According to related commit 60d77146a249ae9b51d7ce98930cdbedb2cfa352,
need use 'form' instead of 'name'.

The related error (under Darwin x86_64):

  ../../binutils-gdb/bfd/dwarf2.c:2222:27: error: implicit conversion from enumeration type 'enum dwarf_attribute' to different enumeration type 'enum dwarf_form'
        [-Werror,-Wenum-conversion]
                    if (is_str_attr (attr.name))
                        ~~~~~~~~~~~  ~~~~~^~~~

bfd/ChangeLog:

	* dwarf2.c (find_abstract_instance_name): Use 'form' instead of
	'name' for the typo issue, which related with commit
	60d77146a249ae9b51d7ce98930cdbedb2cfa352.
---
 bfd/dwarf2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Nick Clifton Aug. 26, 2014, 7:45 a.m. UTC | #1
Hi Chen,

> bfd/ChangeLog:
>
> 	* dwarf2.c (find_abstract_instance_name): Use 'form' instead of
> 	'name' for the typo issue, which related with commit

Approved - please apply.

Cheers
   Nick
  

Patch

diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 583504b..1ca69b6 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -2219,7 +2219,7 @@  find_abstract_instance_name (struct comp_unit *unit,
 		case DW_AT_MIPS_linkage_name:
 		  /* PR 16949:  Corrupt debug info can place
 		     non-string forms into these attributes.  */
-		  if (is_str_attr (attr.name))
+		  if (is_str_attr (attr.form))
 		    name = attr.u.str;
 		  break;
 		default: