|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 10/16] scsi: move request parsing to common code |
Date: | Fri, 12 Aug 2011 19:05:30 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 |
On 08/12/2011 06:12 PM, Peter Maydell wrote:
This patch makes current master fail to compile with optimisation on: gcc complains: hw/scsi-bus.c: In function ‘scsi_req_new’: hw/scsi-bus.c:375: error: ‘req’ may be used uninitialized in this function because in the 'else' clause we look at req->cmd.lba before we've called alloc_req(). My guess is that the tracing should just be moved down to after the allocation?
You can also use cmd.lba instead of req->cmd.lba. I guess the failure depends on the compiler version and tracing options. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |