[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 20/24] ac97: Remove unused local variables
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 20/24] ac97: Remove unused local variables |
Date: |
Sun, 8 May 2011 17:05:15 +0100 |
From: Stefan Weil <address@hidden>
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 <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
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
- [Qemu-devel] [PULL] Trivial patches for April 26 to May 8 2011, Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 04/24] Fix typos in comments (accessable -> accessible, priveleged -> privileged), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 05/24] Fix typo in comment (colum -> column), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 07/24] Fix typo in comment (embeded -> embedded), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 08/24] Fix typo in comment (consistant -> consistent), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 03/24] Fix typos in comments (accross -> across), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 14/24] Fix typos in comments (neccessary -> necessary), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 09/24] Fix typo in comment (dieing -> dying), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 11/24] Fix typos in comments (existance -> existence), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 20/24] ac97: Remove unused local variables,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 06/24] Fix typo in comment (auxilliary -> auxiliary), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 15/24] Fix typos in comments and code (occured -> occurred and related), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 17/24] Fix typo in comment (responsiblity -> responsibility), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 19/24] Fix typos in comment (threshhold -> threshold, mapp -> map), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 21/24] Fix spelling in comments (intruction -> instruction), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 12/24] Fix typos in comments (interupt -> interrupt), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 18/24] Fix typo in comment (truely -> truly), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 13/24] Fix typos in comments (instanciation -> instantiation), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 16/24] Fix typo in comment (relevent -> relevant), Stefan Hajnoczi, 2011/05/08
- [Qemu-devel] [PATCH 02/24] Fix typos in comments (dependancy -> dependency), Stefan Hajnoczi, 2011/05/08