This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] iq2000-tdep.c false GCC uninitialized warning
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 28 Aug 2010 10:13:22 +0200
- Subject: [patch] iq2000-tdep.c false GCC uninitialized warning
Hi,
GCC 4.5+ produces a warning terminating the compilation on -O2.
I will check it in in some days as obvious.
Thanks,
Jan
gdb/
2010-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
* iq2000-tdep.c (iq2000_scan_prologue): Initialize SAL.END.
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -224,6 +224,8 @@ iq2000_scan_prologue (struct gdbarch *gdbarch,
loop_end = scan_end;
if (fi)
sal = find_last_line_symbol (scan_start, scan_end, 0);
+ else
+ sal.end = 0; /* Avoid GCC false warning. */
}
/* Saved registers: