From nobody Fri May 17 04:49:49 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625595047276864.0936712725522; Tue, 6 Jul 2021 11:10:47 -0700 (PDT) Received: from localhost ([::1]:53972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0pWv-00081I-J7 for importer@patchew.org; Tue, 06 Jul 2021 14:10:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0pW6-0007Bu-3o; Tue, 06 Jul 2021 14:09:54 -0400 Received: from mail.weilnetz.de ([37.120.169.71]:39864 helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0pW3-0006ml-Ij; Tue, 06 Jul 2021 14:09:53 -0400 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id 832AFDA0F37; Tue, 6 Jul 2021 20:09:47 +0200 (CEST) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id 2054F460015; Tue, 6 Jul 2021 20:09:47 +0200 (CEST) From: Stefan Weil To: qemu-devel@nongnu.org Subject: [PATCH] target/avr: Fix compiler errors (-Werror=enum-conversion) Date: Tue, 6 Jul 2021 20:09:36 +0200 Message-Id: <20210706180936.249912-1-sw@weilnetz.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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: pass client-ip=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de 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, SPF_HELO_NONE=0.001, SPF_PASS=-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: qemu-trivial@nongnu.org, Richard Henderson , Michael Rolnik , Stefan Weil Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1625595059383100001 ../target/avr/translate.c: In function =E2=80=98gen_jmp_ez=E2=80=99: ../target/avr/translate.c:1012:22: error: implicit conversion from =E2=80= =98enum =E2=80=99 to =E2=80=98DisasJumpType=E2=80=99 [-Werror=3D= enum-conversion] 1012 | ctx->base.is_jmp =3D DISAS_LOOKUP; | ^ Signed-off-by: Stefan Weil Reviewed-by: Michael Rolnik --- -Werror=3Denum-conversion is not enabled by -Wall, but by -Weverything with clang for example. As other targets use similar define statements, I think that's a simple fix. Regards, Stefan target/avr/translate.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index c06ce45bc7..fcc839ac36 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -70,11 +70,9 @@ static const char reg_names[NUMBER_OF_CPU_REGISTERS][8] = =3D { }; #define REG(x) (cpu_r[x]) =20 -enum { - DISAS_EXIT =3D DISAS_TARGET_0, /* We want return to the cpu main lo= op. */ - DISAS_LOOKUP =3D DISAS_TARGET_1, /* We have a variable condition exit= . */ - DISAS_CHAIN =3D DISAS_TARGET_2, /* We have a single condition exit. = */ -}; +#define DISAS_EXIT DISAS_TARGET_0 /* We want return to the cpu main loo= p. */ +#define DISAS_LOOKUP DISAS_TARGET_1 /* We have a variable condition exit.= */ +#define DISAS_CHAIN DISAS_TARGET_2 /* We have a single condition exit. = */ =20 typedef struct DisasContext DisasContext; =20 --=20 2.30.2