From 14a793b2f2d16ac51e6ac53e817a60a520a83200 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 11 Oct 2002 08:33:11 +0000 Subject: Fix numerous occurrences of warning: dereferencing type-punned pointer will break strict-aliasing rules --- bfd/xcofflink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bfd/xcofflink.c') diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index a869d7d..e4e4755 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -1986,6 +1986,7 @@ xcoff_link_add_symbols (abfd, info) && h->descriptor == NULL) { struct xcoff_link_hash_entry *hds; + struct bfd_link_hash_entry *bh; hds = xcoff_link_hash_lookup (xcoff_hash_table (info), h->root.root.string + 1, @@ -1994,13 +1995,14 @@ xcoff_link_add_symbols (abfd, info) goto error_return; if (hds->root.type == bfd_link_hash_new) { + bh = &hds->root; if (! (_bfd_generic_link_add_one_symbol (info, abfd, hds->root.root.string, (flagword) 0, bfd_und_section_ptr, (bfd_vma) 0, (const char *) NULL, false, - true, - (struct bfd_link_hash_entry **) &hds))) + true, &bh))) goto error_return; + hds = (struct xcoff_link_hash_entry *) bh; } hds->flags |= XCOFF_DESCRIPTOR; BFD_ASSERT ((hds->flags & XCOFF_CALLED) == 0 -- cgit v1.1