[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] usb: Fix clang build
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] usb: Fix clang build |
Date: |
Wed, 20 Jan 2021 00:20:43 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
Hi Eric,
On 1/20/21 12:07 AM, Eric Blake wrote:
> ../hw/usb/dev-uas.c:157:31: error: field 'status' with variable sized type
> 'uas_iu' not at the end of a struct or class is a GNU extension
> [-Werror,-Wgnu-variable-sized-type-not-at-end]
> uas_iu status;
> ^
>
> Fix this by specifying a size for the add_cdb member; and at present,
> the code does not actually use that field other than for the size
> chosen for the packed uas_iu_command struct, and the choice of one
> byte does not change the size of the uas_iu union.
I sent a maybe safer approach (from the bus PoV):
https://www.mail-archive.com/qemu-block@nongnu.org/msg79192.html
Do you mind reviewing it?
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
>
> I'm not sure why none of our CI tools pick up this particular clang
> build failure; I hit it on Fedora 33 when configuring to build the
> entire tree with clang.
Same issue after upgrading to f33. I sent a patch to bump our CI:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg774117.html
To track Fedora releases I was thinking about a gitlab job checking
if we are using the latest, else failing; smth as:
$ curl https://getfedora.org/ | grep -q 'Fedora 33 released'