This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Another Darwin build fix
- From: Josh Matthews <josh at joshmatthews dot net>
- To: gdb-patches at sourceware dot org
- Date: Tue, 7 Feb 2012 15:47:01 -0500
- Subject: Another Darwin build fix
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