[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.0 01/11] block: Remove dead assignment
From: |
Laurent Vivier |
Subject: |
Re: [PATCH-for-5.0 01/11] block: Remove dead assignment |
Date: |
Sat, 21 Mar 2020 12:58:23 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
Le 21/03/2020 à 12:46, Philippe Mathieu-Daudé a écrit :
> Fix warning reported by Clang static code analyzer:
>
> block.c:3167:5: warning: Value stored to 'ret' is never read
> ret = bdrv_fill_options(&options, filename, &flags, &local_err);
> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Reported-by: Clang Static Analyzer
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> block.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block.c b/block.c
> index a2542c977b..908c109a8c 100644
> --- a/block.c
> +++ b/block.c
> @@ -3164,7 +3164,7 @@ static BlockDriverState *bdrv_open_inherit(const char
> *filename,
> parent->open_flags, parent->options);
> }
>
> - ret = bdrv_fill_options(&options, filename, &flags, &local_err);
> + bdrv_fill_options(&options, filename, &flags, &local_err);
> if (local_err) {
> goto fail;
> }
>
I would be sruprised if coverity doesn't warn about an unused return value.
Thanks,
Laurent
- [PATCH-for-5.0 00/11] misc: Trivial static code analyzer fixes, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 01/11] block: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 02/11] blockdev: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 03/11] hw/i2c/pm_smbus: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 04/11] hw/input/adb-kbd: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21
- [PATCH-for-5.0 05/11] hw/ide/sii3112: Remove dead assignment, Philippe Mathieu-Daudé, 2020/03/21