This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]