On 7/16/19 5:21 AM, Philippe Mathieu-Daudé wrote:
> I was writing on your v1 "it might be worth commenting this is when
> building with -O3"
> 
> This might be as easy as having the subject modified (by maintainer
> taking this patch?) as:
> 
> "fix uninitialized variable warning [when building with -O3]"
> 

I can do a touchup (probably to the commit body, rather than the subject).


>> cc1: all warnings being treated as errors
>>
>> Reported-by: Thomas Huth <th...@redhat.com>
>> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
>> Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>

Thanks; will queue through my NBD tree.

>> ---
>>  block/nbd.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/block/nbd.c b/block/nbd.c
>> index 81edabbf35..0f74c1e455 100644
>> --- a/block/nbd.c
>> +++ b/block/nbd.c
>> @@ -707,7 +707,7 @@ static bool nbd_reply_chunk_iter_receive(BDRVNBDState *s,
>>                                           void **payload)
>>  {
>>      int ret, request_ret;
>> -    NBDReply local_reply;
>> +    NBDReply local_reply = {};

Relies on the gcc extension rather than the idiomatic C spelling of {0}
(but we rely on it elsewhere, in part because some versions of clang are
buggy on incorrectly warning about the idiomatic spelling, so nothing new)

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to