summaryrefslogtreecommitdiffstats
path: root/include/exec/user
diff options
context:
space:
mode:
authorLaurent Vivier2020-09-02 14:57:52 +0200
committerLaurent Vivier2020-09-03 01:09:31 +0200
commitb119339610d752f799e44bc42f4fe8f9d2bf8072 (patch)
tree184865522c5c4cc0dd3e42c5b8d933502698d7a9 /include/exec/user
parentMerge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into ... (diff)
downloadqemu-b119339610d752f799e44bc42f4fe8f9d2bf8072.tar.gz
qemu-b119339610d752f799e44bc42f4fe8f9d2bf8072.tar.xz
qemu-b119339610d752f799e44bc42f4fe8f9d2bf8072.zip
linux-user: fix implicit conversion from enumeration type error
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> Message-Id: <20200902125752.1033524-1-laurent@vivier.eu>
Diffstat (limited to 'include/exec/user')
-rw-r--r--include/exec/user/thunk.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h
index a5bbb2c733..b281dfa30f 100644
--- a/include/exec/user/thunk.h
+++ b/include/exec/user/thunk.h
@@ -42,7 +42,7 @@ typedef enum argtype {
} argtype;
#define MK_PTR(type) TYPE_PTR, type
-#define MK_ARRAY(type, size) TYPE_ARRAY, size, type
+#define MK_ARRAY(type, size) TYPE_ARRAY, (int)(size), type
#define MK_STRUCT(id) TYPE_STRUCT, id
#define THUNK_TARGET 0