Le 01/09/2020 à 15:06, Peter Maydell a écrit : > On Mon, 31 Aug 2020 at 12:08, Laurent Vivier <laur...@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