From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 9721D3829BA1 for ; Thu, 20 Oct 2022 09:37:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9721D3829BA1 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id ECDED300089; Thu, 20 Oct 2022 09:37:16 +0000 (UTC) From: Tsukasa OI To: Tsukasa OI , Andrew Burgess , Mike Frysinger , Nick Clifton Cc: gdb-patches@sourceware.org Subject: [PATCH 25/40] sim/mn10300: Add an explicit cast Date: Thu, 20 Oct 2022 09:32:30 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2022 09:37:20 -0000 Clang generates a warning if there is an enum value with a mismatching type without an explicit cast ("-Wenum-conversion"). On the default configuration, it causes a build failure (unless "--disable-werror" is specified). This commit adds an explicit cast. --- sim/mn10300/op_utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sim/mn10300/op_utils.c b/sim/mn10300/op_utils.c index 2fccf2da207..34b1b8e3951 100644 --- a/sim/mn10300/op_utils.c +++ b/sim/mn10300/op_utils.c @@ -152,8 +152,9 @@ do_syscall (SIM_DESC sd) if (cb_target_to_host_syscall (STATE_CALLBACK (sd), func) == CB_SYS_exit) { /* EXIT - caller can look in parm1 to work out the reason */ - sim_engine_halt (simulator, STATE_CPU (simulator, 0), NULL, PC, - (parm1 == 0xdead ? SIM_SIGABRT : sim_exited), parm1); + sim_engine_halt ( + simulator, STATE_CPU (simulator, 0), NULL, PC, + (parm1 == 0xdead ? (enum sim_stop) SIM_SIGABRT : sim_exited), parm1); } else { -- 2.34.1