Fix warning reported by Clang static code analyzer:
CC block/qcow2-bitmap.o
block/qcow2-bitmap.c:650:5: warning: Value stored to 'ret' is never read
ret = -EINVAL;
^ ~~~~~~~
Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
block/qcow2-bitmap.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c
index d41f5d049b..8cccc2c9f3 100644
--- a/block/qcow2-bitmap.c
+++ b/block/qcow2-bitmap.c
@@ -647,7 +647,6 @@ static Qcow2BitmapList *bitmap_list_load(BlockDriverState *bs, uint64_t offset,
return bm_list;
broken_dir:
- ret = -EINVAL;
error_setg(errp, "Broken bitmap directory");
fail:
--
2.21.1
Am 15.02.2020 um 17:15 hat Philippe Mathieu-Daudé geschrieben: > Fix warning reported by Clang static code analyzer: > > CC block/qcow2-bitmap.o > block/qcow2-bitmap.c:650:5: warning: Value stored to 'ret' is never read > ret = -EINVAL; > ^ ~~~~~~~ > > Reported-by: Clang Static Analyzer > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> This isn't hw/, so I'm taking it through my tree. Thanks, applied to the block branch. Kevin
15.02.2020 19:15, Philippe Mathieu-Daudé wrote: > Fix warning reported by Clang static code analyzer: > > CC block/qcow2-bitmap.o > block/qcow2-bitmap.c:650:5: warning: Value stored to 'ret' is never read > ret = -EINVAL; > ^ ~~~~~~~ > > Reported-by: Clang Static Analyzer > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > block/qcow2-bitmap.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c > index d41f5d049b..8cccc2c9f3 100644 > --- a/block/qcow2-bitmap.c > +++ b/block/qcow2-bitmap.c > @@ -647,7 +647,6 @@ static Qcow2BitmapList *bitmap_list_load(BlockDriverState *bs, uint64_t offset, > return bm_list; > > broken_dir: > - ret = -EINVAL; > error_setg(errp, "Broken bitmap directory"); > > fail: > Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> -- Best regards, Vladimir
On Sat, Feb 15, 2020 at 05:15:55PM +0100, Philippe Mathieu-Daudé wrote: >Fix warning reported by Clang static code analyzer: > > CC block/qcow2-bitmap.o > block/qcow2-bitmap.c:650:5: warning: Value stored to 'ret' is never read > ret = -EINVAL; > ^ ~~~~~~~ > >Reported-by: Clang Static Analyzer >Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> >--- > block/qcow2-bitmap.c | 1 - > 1 file changed, 1 deletion(-) > Reviewed-by: Ján Tomko <jtomko@redhat.com> Unused since its introduction in 88ddffae8fc1e30cc907c2dbb989b7eba9e62319 Jano
On 2/15/20 8:15 AM, Philippe Mathieu-Daudé wrote: > Fix warning reported by Clang static code analyzer: > > CC block/qcow2-bitmap.o > block/qcow2-bitmap.c:650:5: warning: Value stored to 'ret' is never read > ret = -EINVAL; > ^ ~~~~~~~ > > Reported-by: Clang Static Analyzer > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > block/qcow2-bitmap.c | 1 - > 1 file changed, 1 deletion(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
© 2016 - 2025 Red Hat, Inc.