From nobody Sun Jun 2 18:02:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598976551; cv=none; d=zohomail.com; s=zohoarc; b=iuNWCrfksjKUoBu4VEv9SMmAbXXArg92qDJ4AnWJ5LVk/ELQacqVwEBLb7xjDsRjWc1zmUdMMNwPbGEhpuIEvCC07qFjDFrcgJlZsleF46hmvKe4OJcj2ctn91pJPnk8nZ6ASLPnLU9hC3aD70TaVWK5SjM1nHNYiRvBCfRhTVI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598976551; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=V7j52MpmP6BB/KeOfBA4g5ISXF46O70U6WBZWTutHK0=; b=h37IwC1gjjhH3qUn+U+/blFVFluy2xZDEMBRL9VD6ptRKRljeWDeMr+q71mzKhs25oQh4pKrNWD+II/0eioQvuyrZxaXmV/Kd1CM1Mlx9qEQUtW0PiuISL8a6XT+iUm9CrwW6RY1h2nJy/NOewrCYt+uzBvLQnYyHSLdphqCjvI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598976551706479.1817559379871; Tue, 1 Sep 2020 09:09:11 -0700 (PDT) Received: from localhost ([::1]:39460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD8qM-0005fS-UK for importer@patchew.org; Tue, 01 Sep 2020 12:09:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD8Hv-0003yL-JS for qemu-devel@nongnu.org; Tue, 01 Sep 2020 11:33:35 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:45941) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD8Ht-0008UR-Tu for qemu-devel@nongnu.org; Tue, 01 Sep 2020 11:33:35 -0400 Received: from localhost.localdomain ([82.252.135.186]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MdwRi-1kkp920jWI-00b5nn; Tue, 01 Sep 2020 17:33:30 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PATCH] linux-user: fix implicit conversion from enumeration type error Date: Tue, 1 Sep 2020 17:33:21 +0200 Message-Id: <20200901153321.920490-1-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:t7fLNYjmVWVsgcmOTqVx4r3QPEP4kaIRaNw9xN6EIFmSHG7iR9P W4Ub5il91XLJYPGE4Eeawqy/CWyKQgss5X+3XnKjSGCjB3vl/KM2CBsxpw8aE3zk4EymJGv Doh3p3I0kEQh7aXwbdacnDPu+k0mM5b71ylyyuiyEOjn692mp+XGeiVDG1ffgT6TeVu6PiI 0ci/wk/LOVg1vaAcCnS2A== X-UI-Out-Filterresults: notjunk:1;V03:K0:44/Vfp6phLY=:Zz1wh/nZdiMpnjhU5kWyGv FQgTT/eRNhxORP2Q0i0Dyb/iViOw74sVfds+rghUg6qiKs8peEM8+EUkn3C6Pme94ehy7RkmM x/BI6Zb+PglHR3HuKZJl9Gx/YIwBu8QvxhK5CSA+9uFij7fN8ATou9qrU+f0HwxQDQgm6fMDh WPsJcraaHMj9zLTiA3Mqc59jqjCxOX790piUxDaeGqMKmEXR9eGxvR3ZvYc4dO/BPMcmVKRTl 3lc6kSIm+Ima5fcbz/7oLDt/Hj1NHK11m3qTO2pLJ75zZeJwXSElnT9PRfirqyepLGPdpCQP3 Dvq6XyavGMjUXEO4xDAWy9m7QlFLPhEnV4+pfmM5i8YreKzefGt/DuDINg6VR0aLi6Ol17J39 Kn6+FHEpOqYop2QKr+7khQf8AC1kNrS5riLHpqa0Xhww7MX/HgXkKUogASf56r4oQBoi8miEc vh50DchrODrsbuCTssPN1MfovCyyc1dQ3VJC9O18wWl4Ct6w1Ak39rZ3+c30iWn/mxO2YXDYo iaQ0mglkb+u/eY/4n0T/JKvBikNLWZygkXXvQYugy07mpuxdWfs/U2yh9T9vTSYZnLEVnP9FO LfE8SKzlYVTCwvrj4ORMN7ZIGlvMYettRltDlTdIdYniHaU82pW6JO4I/8NTMr8HLslsy+3yh tHyljK5wDPZL/OhGAjLNQ/c7i0M73Vx1ZneUXRy/V+8zAAJjNVoOKvw5ltix6GZUQeRaAPzf6 BCn56uy4QwZsj+bj0qLrxxgli/w4V961wSk++HuWnCne/R2PlO9xfsX6qdV2TgashlmTfvC9C jzOcnF12HLUqGjuhIewBPBLoCkUJTPMAl4Rt1qLT4mkuqNpHIFCYuYCY2PX0aekBreGGj0E Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=212.227.126.135; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 10:10:07 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Filip Bozuta Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/user/thunk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h index a5bbb2c73331..b798fcb69cf4 100644 --- a/include/exec/user/thunk.h +++ b/include/exec/user/thunk.h @@ -42,7 +42,7 @@ typedef enum argtype { } argtype; =20 #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 =20 #define THUNK_TARGET 0 --=20 2.26.2