[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] nbd: fix uninitialized variable warning
From: |
Richard Henderson |
Subject: |
Re: [PATCH v2] nbd: fix uninitialized variable warning |
Date: |
Wed, 8 Jan 2020 13:44:24 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 1/8/20 12:51 PM, address@hidden wrote:
> From: Pan Nengyuan <address@hidden>
>
> Fixes:
> /mnt/sdb/qemu/nbd/server.c: In function 'nbd_handle_request':
> /mnt/sdb/qemu/nbd/server.c:2313:9: error: 'ret' may be used uninitialized in
> this function [-Werror=maybe-uninitialized]
> int ret;
>
> Reported-by: Euler Robot <address@hidden>
> Signed-off-by: Pan Nengyuan <address@hidden>
> ---
> Changes v2 to v1:
> - change 'if(client->export_meta.bitmap)' into 'else' to fix uninitialized
> warning and clean up pointless code (suggested by Eric Blake)
> ---
> nbd/server.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~