From: DJ Delorie <dj@redhat.com>
To: gdb-patches@sourceware.org
Subject: [patch] initialize some variables in m32c-tdep.c
Date: Tue, 29 Aug 2006 12:45:00 -0000 [thread overview]
Message-ID: <200608282047.k7SKlx1Y026282@greed.delorie.com> (raw)
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:
next reply other threads:[~2006-08-28 20:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-29 12:45 DJ Delorie [this message]
2006-08-29 13:04 ` Daniel Jacobowitz
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=200608282047.k7SKlx1Y026282@greed.delorie.com \
--to=dj@redhat.com \
--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