[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.10???] fix build failure in nbd_read_reply
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH for-2.10???] fix build failure in nbd_read_reply_entry() |
Date: |
Thu, 17 Aug 2017 18:16:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 17/08/2017 18:14, Igor Mammedov wrote:
> travis builds fail at HEAD at rc3 master with
>
> block/nbd-client.c: In function ‘nbd_read_reply_entry’:
> block/nbd-client.c:110:8: error: ‘ret’ may be used uninitialized in this
> function [-Werror=uninitialized]
>
> fix it by initializing 'ret' to 0
This is a false positive, but it's understandably impossible for the
compiler to figure it out.
Even though we disable -Werror on release builds, it may be worth fixing
this in 2.10 if it doesn't delay the release. Peter, what do you think
about applying this on top of -rc3 without doing a fourth candidate?
Paolo
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
> block/nbd-client.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/nbd-client.c b/block/nbd-client.c
> index 422ecb4..02c8e20 100644
> --- a/block/nbd-client.c
> +++ b/block/nbd-client.c
> @@ -70,7 +70,7 @@ static coroutine_fn void nbd_read_reply_entry(void *opaque)
> {
> NBDClientSession *s = opaque;
> uint64_t i;
> - int ret;
> + int ret = 0;
> Error *local_err = NULL;
>
> while (!s->quit) {
>
Re: [Qemu-devel] [PATCH for-2.10???] fix build failure in nbd_read_reply_entry(), Eric Blake, 2017/08/17
Re: [Qemu-devel] [PATCH for-2.10???] fix build failure in nbd_read_reply_entry(), Peter Maydell, 2017/08/23