aboutsummaryrefslogtreecommitdiff
path: root/hw/lsi53c895a.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-09-04 11:22:31 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-09-10 14:52:33 +0000
commita6c6f44ae4a8637e2c7394b46e2ba15f7b7682a0 (patch)
treeaad7ce8fa0e2ffa9ed370b9a12836bd0f31bbc08 /hw/lsi53c895a.c
parent337fc758703b2cc2edabc1fdca5907f11fa837b0 (diff)
lsi53c895a: avoid a warning from clang analyzer
Avoid this warning from clang analyzer by deleting the variable: /src/qemu/hw/lsi53c895a.c:895:5: warning: Value stored to 'id' is never read id = (current_tag >> 8) & 0xf; Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/lsi53c895a.c')
-rw-r--r--hw/lsi53c895a.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 1643a63ee8..ac284e9609 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -883,7 +883,6 @@ static void lsi_do_msgout(LSIState *s)
int len;
uint32_t current_tag;
lsi_request *current_req, *p, *p_next;
- int id;
if (s->current) {
current_tag = s->current->tag;
@@ -892,7 +891,6 @@ static void lsi_do_msgout(LSIState *s)
current_tag = s->select_tag;
current_req = lsi_find_by_tag(s, current_tag);
}
- id = (current_tag >> 8) & 0xf;
DPRINTF("MSG out len=%d\n", s->dbc);
while (s->dbc) {
@@ -977,9 +975,8 @@ static void lsi_do_msgout(LSIState *s)
device, but this is currently not implemented (and seems not
to be really necessary). So let's simply clear all queued
commands for the current device: */
- id = current_tag & 0x0000ff00;
QTAILQ_FOREACH_SAFE(p, &s->queue, next, p_next) {
- if ((p->tag & 0x0000ff00) == id) {
+ if ((p->tag & 0x0000ff00) == (current_tag & 0x0000ff00)) {
scsi_req_cancel(p->req);
}
}