[Qemu-devel] Re: [PATCH] spapr_vscsi: Set uninitialized variable

2011-04-05 Thread Alexander Graf
On 05.04.2011, at 07:04, Benjamin Herrenschmidt wrote: > > On Tue, 2011-04-05 at 14:14 +1000, David Gibson wrote: @@ -255,7 +255,7 @@ static int vscsi_srp_direct_data(VSCSIState *s, >> vscsi_req *req, { struct srp_direct_buf *md = req->cur_desc; uint32_t llen; -

[Qemu-devel] Re: [PATCH] spapr_vscsi: Set uninitialized variable

2011-04-04 Thread Benjamin Herrenschmidt
On Tue, 2011-04-05 at 14:14 +1000, David Gibson wrote: > > >@@ -255,7 +255,7 @@ static int vscsi_srp_direct_data(VSCSIState *s, > vscsi_req *req, > > > { > > > struct srp_direct_buf *md = req->cur_desc; > > > uint32_t llen; > > >-int rc; > > >+int rc = 0; > > > > David, is this

[Qemu-devel] Re: [PATCH] spapr_vscsi: Set uninitialized variable

2011-04-04 Thread David Gibson
On Mon, Apr 04, 2011 at 05:03:44PM +0200, Alexander Graf wrote: > On 04/03/2011 06:21 PM, Stefan Weil wrote: > >cppcheck reports this error: > > > >hw/spapr_vscsi.c:274: error: Uninitialized variable: rc > > > >If llen == 0, rc was indeed used without being initialized. > > > >Signed-off-by: Stefan

[Qemu-devel] Re: [PATCH] spapr_vscsi: Set uninitialized variable

2011-04-04 Thread Alexander Graf
On 04/03/2011 06:21 PM, Stefan Weil wrote: cppcheck reports this error: hw/spapr_vscsi.c:274: error: Uninitialized variable: rc If llen == 0, rc was indeed used without being initialized. Signed-off-by: Stefan Weil --- hw/spapr_vscsi.c |2 +- 1 files changed, 1 insertions(+), 1 deletion