From f771c12ef2f2ffe4871c43350392d2ff4168dc9c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 22 Feb 2012 14:11:28 +0100 Subject: [PATCH 012/109] hw/scsi-bus.c: Fix use of uninitialised variable RH-Author: Paolo Bonzini Message-id: <1329919979-20948-12-git-send-email-pbonzini@redhat.com> Patchwork-id: 37495 O-Subject: [RHEL 6.3 qemu-kvm PATCH v2 011/102] hw/scsi-bus.c: Fix use of uninitialised variable Bugzilla: 782029 RH-Acked-by: Gerd Hoffmann RH-Acked-by: Laszlo Ersek RH-Acked-by: Orit Wasserman From: Peter Maydell Don't use req before it has been initialised in scsi_req_new(). This fixes a compile failure due to gcc complaining about this. Signed-off-by: Peter Maydell Acked-by: Paolo Bonzini Signed-off-by: Blue Swirl (cherry picked from 3b6ffe50300f13240e1b46420ad05da1116df410) --- hw/scsi-bus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Signed-off-by: Michal Novotny --- hw/scsi-bus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index a3c9b4f..efa3329 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -180,7 +180,7 @@ SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun, } else { trace_scsi_req_parsed(d->id, lun, tag, buf[0], cmd.mode, cmd.xfer); - if (req->cmd.lba != -1) { + if (cmd.lba != -1) { trace_scsi_req_parsed_lba(d->id, lun, tag, buf[0], cmd.lba); } -- 1.7.7.6