* [Qemu-devel] [PATCH] block/iscsi: fix uninitialized variable
@ 2014-12-23 15:30 Peter Wu
2014-12-23 16:31 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Peter Wu @ 2014-12-23 15:30 UTC (permalink / raw)
To: Peter Lieven, qemu-devel; +Cc: qemu-trivial, Kevin Wolf, Paolo Bonzini
'ret' was never initialized in the success path.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
---
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. "
--
2.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] block/iscsi: fix uninitialized variable
2014-12-23 15:30 [Qemu-devel] [PATCH] block/iscsi: fix uninitialized variable Peter Wu
@ 2014-12-23 16:31 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2014-12-23 16:31 UTC (permalink / raw)
To: Peter Wu, Peter Lieven, qemu-devel; +Cc: qemu-trivial, Kevin Wolf
On 23/12/2014 16:30, Peter Wu wrote:
> 'ret' was never initialized in the success path.
>
> Signed-off-by: Peter Wu <peter@lekensteyn.nl>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-23 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-23 15:30 [Qemu-devel] [PATCH] block/iscsi: fix uninitialized variable Peter Wu
2014-12-23 16:31 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).