[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] linux-user: fix implicit conversion from enumeration type
From: |
Richard Henderson |
Subject: |
Re: [PATCH v2] linux-user: fix implicit conversion from enumeration type error |
Date: |
Thu, 3 Sep 2020 13:27:51 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 9/2/20 5:57 AM, Laurent Vivier wrote:
> MK_ARRAY(type,size) is used to fill the field_types buffer, and if the
> "size" parameter is an enum type, clang [-Werror,-Wenum-conversion] reports
> an error when it is assigned to field_types which is also an enum, argtypes.
>
> To avoid that, convert "size" to "int" in MK_ARRAY(). "int" is the type
> used for the size evaluation in thunk_type_size().
>
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> ---
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~