qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 20/24] ac97: Remove unused local variables
Date: Sun,  8 May 2011 17:05:15 +0100	[thread overview]
Message-ID: <1304870719-20885-21-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1304870719-20885-1-git-send-email-stefanha@linux.vnet.ibm.com>

From: Stefan Weil <weil@mail.berlios.de>

cppcheck report:
hw/ac97.c:1004: style:
 Variable 'written' is assigned a value that is never used
hw/ac97.c:1072: style:
 Variable 'written' is assigned a value that is never used

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/ac97.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/hw/ac97.c b/hw/ac97.c
index d71072d..a946c1a 100644
--- a/hw/ac97.c
+++ b/hw/ac97.c
@@ -1001,8 +1001,6 @@ static int write_audio (AC97LinkState *s, AC97BusMasterRegs *r,
 
 static void write_bup (AC97LinkState *s, int elapsed)
 {
-    int written = 0;
-
     dolog ("write_bup\n");
     if (!(s->bup_flag & BUP_SET)) {
         if (s->bup_flag & BUP_LAST) {
@@ -1026,7 +1024,6 @@ static void write_bup (AC97LinkState *s, int elapsed)
                 return;
             temp -= copied;
             elapsed -= copied;
-            written += copied;
         }
     }
 }
@@ -1069,7 +1066,7 @@ static int read_audio (AC97LinkState *s, AC97BusMasterRegs *r,
 static void transfer_audio (AC97LinkState *s, int index, int elapsed)
 {
     AC97BusMasterRegs *r = &s->bm_regs[index];
-    int written = 0, stop = 0;
+    int stop = 0;
 
     if (s->invalid_freq[index]) {
         AUD_log ("ac97", "attempt to use voice %d with invalid frequency %d\n",
@@ -1114,7 +1111,6 @@ static void transfer_audio (AC97LinkState *s, int index, int elapsed)
         switch (index) {
         case PO_INDEX:
             temp = write_audio (s, r, elapsed, &stop);
-            written += temp;
             elapsed -= temp;
             r->picb -= (temp >> 1);
             break;
-- 
1.7.4.4

  parent reply	other threads:[~2011-05-08 16:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-08 16:04 [Qemu-devel] [PULL] Trivial patches for April 26 to May 8 2011 Stefan Hajnoczi
2011-05-08 16:04 ` [Qemu-devel] [PATCH 01/24] Fix typo in code and comments Stefan Hajnoczi
2011-05-08 16:04 ` [Qemu-devel] [PATCH 02/24] Fix typos in comments (dependancy -> dependency) Stefan Hajnoczi
2011-05-08 16:04 ` [Qemu-devel] [PATCH 03/24] Fix typos in comments (accross -> across) Stefan Hajnoczi
2011-05-08 16:04 ` [Qemu-devel] [PATCH 04/24] Fix typos in comments (accessable -> accessible, priveleged -> privileged) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 05/24] Fix typo in comment (colum -> column) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 06/24] Fix typo in comment (auxilliary -> auxiliary) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 07/24] Fix typo in comment (embeded -> embedded) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 08/24] Fix typo in comment (consistant -> consistent) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 09/24] Fix typo in comment (dieing -> dying) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 10/24] Fix typos in comments (imediately -> immediately) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 11/24] Fix typos in comments (existance -> existence) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 12/24] Fix typos in comments (interupt -> interrupt) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 13/24] Fix typos in comments (instanciation -> instantiation) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 14/24] Fix typos in comments (neccessary -> necessary) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 15/24] Fix typos in comments and code (occured -> occurred and related) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 16/24] Fix typo in comment (relevent -> relevant) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 17/24] Fix typo in comment (responsiblity -> responsibility) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 18/24] Fix typo in comment (truely -> truly) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 19/24] Fix typos in comment (threshhold -> threshold, mapp -> map) Stefan Hajnoczi
2011-05-08 16:05 ` Stefan Hajnoczi [this message]
2011-05-08 16:05 ` [Qemu-devel] [PATCH 21/24] Fix spelling in comments (intruction -> instruction) Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 22/24] linux-user: Replace deprecated function Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 23/24] libcacard: add correct subdirectory dependencies Stefan Hajnoczi
2011-05-08 16:05 ` [Qemu-devel] [PATCH 24/24] lsi53c895a: Rename 'sense' to 'status' Stefan Hajnoczi
2011-05-12 12:57 ` [Qemu-devel] [PULL] Trivial patches for April 26 to May 8 2011 Paolo Bonzini
2011-05-12 13:34 ` Anthony Liguori

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=1304870719-20885-21-git-send-email-stefanha@linux.vnet.ibm.com \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@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).