qemu-devel
[Top][All Lists]
Advanced

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

Re: [PULL 0/8] Linux user for 5.2 patches


From: Laurent Vivier
Subject: Re: [PULL 0/8] Linux user for 5.2 patches
Date: Tue, 1 Sep 2020 16:02:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

Le 01/09/2020 à 15:06, Peter Maydell a écrit :
> On Mon, 31 Aug 2020 at 12:08, Laurent Vivier <laurent@vivier.eu> wrote:
>>
>> The following changes since commit 39335fab59e11cfda9b7cf63929825db2dd3a3e0:
>>
>>   Merge remote-tracking branch 
>> 'remotes/vivier2/tags/linux-user-for-5.2-pull-=
>> request' into staging (2020-08-28 22:30:11 +0100)
>>
>> are available in the Git repository at:
>>
>>   git://github.com/vivier/qemu.git tags/linux-user-for-5.2-pull-request
>>
>> for you to fetch changes up to d6676fc62a52e020df32abf927c2e7183781a2e3:
>>
>>   linux-user: Add support for btrfs ioctls used to scrub a filesystem 
>> (2020-0=
>> 8-29 10:14:52 +0200)
>>
>> ----------------------------------------------------------------
>> Add btrfs support
> 
> Fails to build with clang, I'm afraid:
> 
> In file included from ../../linux-user/syscall.c:4561:
> ../../linux-user/syscall_types.h:485:33: error: implicit conversion
> from enumeration type 'enum btrfs_dev_stat_values' to different
> enumeration type 'argtype' (aka 'enum argtype')
> [-Werror,-Wenum-conversion]
>        MK_ARRAY(TYPE_ULONGLONG, BTRFS_DEV_STAT_VALUES_MAX), /* values */
>        ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/petmay01/linaro/qemu-for-merges/include/exec/user/thunk.h:45:42:
> note: expanded from macro 'MK_ARRAY'
> #define MK_ARRAY(type, size) TYPE_ARRAY, size, type
>                                          ^~~~
> ../../linux-user/syscall.c:4559:79: note: expanded from macro 'STRUCT'
> #define STRUCT(name, ...) static const argtype struct_ ## name ##
> _def[] = {  __VA_ARGS__, TYPE_NULL };
> 
>     ~  ^~~~~~~~~~~
> 1 error generated.
> 

Thank you Peter.

I think the fix might be to introduce a new patch to cast "size" to
"unsigned int" in:

    #define MK_ARRAY(type, size) TYPE_ARRAY, size, type

as size in the case of btrfs is BTRFS_DEV_STAT_VALUES_MAX that is
defined as an enum of btrfs_dev_stat_values, and MK_ARRAY() values are
put in an array of argtype enum.

Laurent



reply via email to

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