qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Stefan Weil <sw@weilnetz.de>
Subject: [Qemu-devel] [PATCH] hw: Disable code after return statement
Date: Sun, 23 Sep 2012 08:41:32 +0200	[thread overview]
Message-ID: <1348382492-8342-1-git-send-email-sw@weilnetz.de> (raw)

Report from smatch:
microdrive.c:212 md_common_read(34) info: ignoring unreachable code.
microdrive.c:273 md_common_write(33) info: ignoring unreachable code.
sd.c:343 sd_req_crc_validate(9) info: ignoring unreachable code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 hw/ide/microdrive.c |    3 ++-
 hw/sd.c             |    2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c
index 64810f7..07c6f97 100644
--- a/hw/ide/microdrive.c
+++ b/hw/ide/microdrive.c
@@ -207,7 +207,7 @@ static uint16_t md_common_read(void *opaque, uint32_t at)
     case 0x0:	/* Even RD Data */
     case 0x8:
         return ide_data_readw(&s->bus, 0);
-
+#if 0
         /* TODO: 8-bit accesses */
         if (s->cycle)
             ret = s->io >> 8;
@@ -217,6 +217,7 @@ static uint16_t md_common_read(void *opaque, uint32_t at)
         }
         s->cycle = !s->cycle;
         return ret;
+#endif
     case 0x9:	/* Odd RD Data */
         return s->io >> 8;
     case 0xd:	/* Error */
diff --git a/hw/sd.c b/hw/sd.c
index ec26407..62a7751 100644
--- a/hw/sd.c
+++ b/hw/sd.c
@@ -340,7 +340,9 @@ static int sd_req_crc_validate(SDRequest *req)
     buffer[3] = (req->arg >> 8) & 0xff;
     buffer[4] = (req->arg >> 0) & 0xff;
     return 0;
+#if 0
     return sd_crc7(buffer, 5) != req->crc;	/* TODO */
+#endif
 }
 
 static void sd_response_r1_make(SDState *sd, uint8_t *response)
-- 
1.7.10

             reply	other threads:[~2012-09-23  6:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-23  6:41 Stefan Weil [this message]
2012-10-05 11:53 ` [Qemu-devel] [Qemu-trivial] [PATCH] hw: Disable code after return statement Stefan Hajnoczi

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=1348382492-8342-1-git-send-email-sw@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.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;
as well as URLs for NNTP newsgroup(s).