qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] VDI patches


From: Paolo Bonzini
Subject: Re: [Qemu-devel] VDI patches
Date: Sat, 17 Mar 2012 08:33:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

Il 17/03/2012 08:10, Stefan Weil ha scritto:
> Hi Kevin, hi Paolo,
> 
> the build failure is caused by the vdi changes: some versions of gcc
> detect uninitialized local variables (my gcc 4.4.5 does not).
> 
> I don't think that it's really an error because the code is guarded
> by the local variable 'block', but not all compilers are clever enough,
> so it should be fixed.
> 
> It can be fixed by modifying commit
> af93911fd45f4de34ca2d5813905e2cf43675c98
> (vdi: move aiocb fields to locals) like that:
> 
> --- a/block/vdi.c
> +++ b/block/vdi.c
> @@ -519,8 +519,8 @@ static int vdi_co_write(BlockDriverState *bs,
>      uint32_t block_index;
>      uint32_t sector_in_block;
>      uint32_t n_sectors;
> -    uint32_t bmap_first;
> -    uint32_t bmap_last;
> +    uint32_t bmap_first = VDI_UNALLOCATED;
> +    uint32_t bmap_last = VDI_UNALLOCATED;
>      uint8_t *block = NULL;
>      int ret = 0;
> 
> Regards,
> Stefan W.
> 
> 
> 

Yes, I'll post v2.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]