public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [gdbadmin@sourceware.org: make-snapshot gdb current failed]
Date: Thu, 14 Jul 2011 07:12:00 -0000	[thread overview]
Message-ID: <20110714062220.GV26365@bubble.grove.modra.org> (raw)
In-Reply-To: <20110714042415.GD2512@adacore.com>

On Wed, Jul 13, 2011 at 09:24:15PM -0700, Joel Brobecker wrote:
> linker.c: In function `_bfd_generic_section_already_linked':
> linker.c:3043: warning: 'l_flags' might be used uninitialized in this function

Huh, so the versions of gcc I used to compile this code don't detect
this problem.  gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 and
xgcc (GCC) 4.7.0 20110706 (experimental).  Not nice.

	* linker.c (_bfd_generic_section_already_linked): Set l_flags.
	* elf-bfd.h (struct already_linked): Forward declare.

Index: bfd/linker.c
===================================================================
RCS file: /cvs/src/src/bfd/linker.c,v
retrieving revision 1.86
diff -u -p -r1.86 linker.c
--- bfd/linker.c	9 Jul 2011 06:20:51 -0000	1.86
+++ bfd/linker.c	14 Jul 2011 06:20:16 -0000
@@ -3057,6 +3057,7 @@ _bfd_generic_section_already_linked (bfd
 	{
 	  l_sec = l->linked.u.sec;
 	  l_owner = l_sec->owner;
+	  l_flags = l_sec->flags;
 	  l_comdat = bfd_coff_get_comdat_section (l_sec->owner, l_sec);
 	}
 
Index: bfd/elf-bfd.h
===================================================================
RCS file: /cvs/src/src/bfd/elf-bfd.h,v
retrieving revision 1.325
diff -u -p -r1.325 elf-bfd.h
--- bfd/elf-bfd.h	11 Jul 2011 15:03:04 -0000	1.325
+++ bfd/elf-bfd.h	14 Jul 2011 06:20:17 -0000
@@ -1797,6 +1797,7 @@ extern bfd_boolean _bfd_elf_match_sectio
   (bfd *, const asection *, bfd *, const asection *);
 extern bfd_boolean bfd_elf_is_group_section
   (bfd *, const struct bfd_section *);
+struct already_linked;
 extern void _bfd_elf_section_already_linked
   (bfd *, struct already_linked *, struct bfd_link_info *);
 extern void bfd_elf_set_group_contents

-- 
Alan Modra
Australia Development Lab, IBM

  reply	other threads:[~2011-07-14  6:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14  6:49 Joel Brobecker
2011-07-14  7:12 ` Alan Modra [this message]
2016-03-22  3:47 Joel Brobecker
2016-03-22  9:39 ` Nick Clifton
2016-03-22 13:25   ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110714062220.GV26365@bubble.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).