Message ID | 20200215161557.4077-2-philmd@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hw: Remove unneeded variable assignment | expand |
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~
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
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>
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
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:
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(-)