Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] initialize some variables in m32c-tdep.c
@ 2006-08-29 12:45 DJ Delorie
  2006-08-29 13:04 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: DJ Delorie @ 2006-08-29 12:45 UTC (permalink / raw)
  To: gdb-patches


Unless we have some magic "yes this is always initialized when used"
attribute, this is needed to build this file with -Werror.

	* m32c-tdep.c (m32c_decode_srcdest4): Initialize fields in sd
	that may not be initialized elsewhere.
	(m32c_decode_sd23): Likewise.

Index: m32c-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m32c-tdep.c,v
retrieving revision 1.2
diff -p -U3 -r1.2 m32c-tdep.c
--- m32c-tdep.c	13 Jul 2006 12:01:21 -0000	1.2
+++ m32c-tdep.c	28 Aug 2006 20:45:04 -0000
@@ -1196,6 +1196,9 @@ m32c_decode_srcdest4 (struct m32c_pv_sta
   else
     sd.kind = srcdest_mem;
 
+  sd.addr = pv_unknown ();
+  sd.reg = 0;
+
   switch (code)
     {
     case 0x0: sd.reg = (size == 1 ? &st->r0 : &st->r0); break;
@@ -1232,6 +1235,9 @@ m32c_decode_sd23 (struct m32c_pv_state *
 {
   struct srcdest sd;
 
+  sd.addr = pv_unknown ();
+  sd.reg = 0;
+
   switch (code)
     {
     case 0x12:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] initialize some variables in m32c-tdep.c
  2006-08-29 12:45 [patch] initialize some variables in m32c-tdep.c DJ Delorie
@ 2006-08-29 13:04 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2006-08-29 13:04 UTC (permalink / raw)
  To: DJ Delorie; +Cc: gdb-patches

On Mon, Aug 28, 2006 at 04:47:59PM -0400, DJ Delorie wrote:
> 
> Unless we have some magic "yes this is always initialized when used"
> attribute, this is needed to build this file with -Werror.
> 
> 	* m32c-tdep.c (m32c_decode_srcdest4): Initialize fields in sd
> 	that may not be initialized elsewhere.
> 	(m32c_decode_sd23): Likewise.

OK, thanks.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-28 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-29 12:45 [patch] initialize some variables in m32c-tdep.c DJ Delorie
2006-08-29 13:04 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox