Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Josh Matthews <josh@joshmatthews.net>
To: gdb-patches@sourceware.org
Subject: Another Darwin build fix
Date: Tue, 07 Feb 2012 20:47:00 -0000	[thread overview]
Message-ID: <CAOvJiVVOw6eXwdA622LHk_gZYdMdJeY9wqro2yj-NhEHewC_Ew@mail.gmail.com> (raw)

The system default gcc on 10.6.8 hits an uninitialized value warning
which causes the build to fail.

Cheers,
Josh

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f85f139..73803fd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-07  Josh Matthews  <josh@joshmatthews.net>  (tiny change)
+
+       Fix build error in Darwin port.
+       * machoread.c: Initialize nbr_syms to avoid warnings-as-errors failure.
+
 2012-02-07  Tom Tromey  <tromey@redhat.com>

        * charset.c (find_charset_names): Check 'in' against NULL.
diff --git a/gdb/machoread.c b/gdb/machoread.c
index 9fa97e1..88ce612 100644
--- a/gdb/machoread.c
+++ b/gdb/machoread.c
@@ -180,7 +180,7 @@ macho_symtab_read (struct objfile *objfile,
   const asymbol *dir_so = NULL;
   const asymbol *file_so = NULL;
   asymbol **oso_file = NULL;
-  unsigned int nbr_syms;
+  unsigned int nbr_syms = 0;

   /* Current state while reading stabs.  */
   enum


             reply	other threads:[~2012-02-07 20:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07 20:47 Josh Matthews [this message]
2012-02-08  9:06 ` Tristan Gingold
2012-02-08 12:55   ` Josh Matthews

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=CAOvJiVVOw6eXwdA622LHk_gZYdMdJeY9wqro2yj-NhEHewC_Ew@mail.gmail.com \
    --to=josh@joshmatthews.net \
    --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