[Qemu-devel] [PATCH] block/win32: fix 'ret not initialized' warning

Gerd Hoffmann posted 1 patch 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170516074256.24731-1-kraxel@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
block/file-win32.c | 1 +
1 file changed, 1 insertion(+)
[Qemu-devel] [PATCH] block/win32: fix 'ret not initialized' warning
Posted by Gerd Hoffmann 6 years, 11 months ago
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 block/file-win32.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/file-win32.c b/block/file-win32.c
index 1a35dbabf2..8f14f0bdcd 100644
--- a/block/file-win32.c
+++ b/block/file-win32.c
@@ -346,6 +346,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
 
     if (qdict_get_try_bool(options, "locking", false)) {
         error_setg(errp, "locking=on is not supported on Windows");
+        ret = -EINVAL;
         goto fail;
     }
 
-- 
2.9.3


Re: [Qemu-devel] [PATCH] block/win32: fix 'ret not initialized' warning
Posted by Stefan Weil 6 years, 11 months ago
Am 16.05.2017 um 09:42 schrieb Gerd Hoffmann:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  block/file-win32.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/block/file-win32.c b/block/file-win32.c
> index 1a35dbabf2..8f14f0bdcd 100644
> --- a/block/file-win32.c
> +++ b/block/file-win32.c
> @@ -346,6 +346,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
>
>      if (qdict_get_try_bool(options, "locking", false)) {
>          error_setg(errp, "locking=on is not supported on Windows");
> +        ret = -EINVAL;
>          goto fail;
>      }


This is a bug fix for commit 1c3a555c.

Reviewed-by: Stefan Weil <sw@weilnetz.de>


Re: [Qemu-devel] [PATCH] block/win32: fix 'ret not initialized' warning
Posted by Fam Zheng 6 years, 11 months ago
On Tue, 05/16 09:52, Stefan Weil wrote:
> Am 16.05.2017 um 09:42 schrieb Gerd Hoffmann:
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > ---
> >  block/file-win32.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/block/file-win32.c b/block/file-win32.c
> > index 1a35dbabf2..8f14f0bdcd 100644
> > --- a/block/file-win32.c
> > +++ b/block/file-win32.c
> > @@ -346,6 +346,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
> > 
> >      if (qdict_get_try_bool(options, "locking", false)) {
> >          error_setg(errp, "locking=on is not supported on Windows");
> > +        ret = -EINVAL;
> >          goto fail;
> >      }
> 
> 
> This is a bug fix for commit 1c3a555c.
> 
> Reviewed-by: Stefan Weil <sw@weilnetz.de>
> 
> 

Thank you!

Reviewed-by: Fam Zheng <famz@redhat.com>

Re: [Qemu-devel] [Qemu-block] [PATCH] block/win32: fix 'ret not initialized' warning
Posted by Stefan Hajnoczi 6 years, 11 months ago
On Tue, May 16, 2017 at 09:42:55AM +0200, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  block/file-win32.c | 1 +
>  1 file changed, 1 insertion(+)

Thanks, applied to my staging tree:
https://github.com/stefanha/qemu/commits/staging

Stefan