From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3SN1-0003ta-Mj for qemu-devel@nongnu.org; Tue, 23 Dec 2014 11:31:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y3SMv-00076g-M8 for qemu-devel@nongnu.org; Tue, 23 Dec 2014 11:31:39 -0500 Message-ID: <549998CB.4050809@redhat.com> Date: Tue, 23 Dec 2014 17:31:07 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1419348641-20955-1-git-send-email-peter@lekensteyn.nl> In-Reply-To: <1419348641-20955-1-git-send-email-peter@lekensteyn.nl> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block/iscsi: fix uninitialized variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Wu , Peter Lieven , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Kevin Wolf On 23/12/2014 16:30, Peter Wu wrote: > 'ret' was never initialized in the success path. > > Signed-off-by: Peter Wu > --- > Hi, > > Found this warning when compiling with --enable-debug. This issue was previously > fixed as part of Peter Lieven's patch series[1] but it never seemed to get > merged. > > Kinds regards, > Peter > > [1]: https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg04279.html > --- > block/iscsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/iscsi.c b/block/iscsi.c > index ed375fc..12ddbfb 100644 > --- a/block/iscsi.c > +++ b/block/iscsi.c > @@ -1286,7 +1286,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags, > QemuOpts *opts; > Error *local_err = NULL; > const char *filename; > - int i, ret; > + int i, ret = 0; > > if ((BDRV_SECTOR_SIZE % 512) != 0) { > error_setg(errp, "iSCSI: Invalid BDRV_SECTOR_SIZE. " > Thanks. Paolo