From patchwork Thu Dec 21 07:01:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82647 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AE06B386C5A4 for ; Thu, 21 Dec 2023 07:02:22 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 0B4A9385E456 for ; Thu, 21 Dec 2023 07:01:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B4A9385E456 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0B4A9385E456 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703142105; cv=none; b=V/T9Lj6N5ExR4IT//LX/rL9UqoPZ4CnhHFNlBPwtlSV+G8c53cF2zt3HZ+SMJMHDA87uwaZJTFwEIzoXMxbam/d8jpHSGddWu0FbtXsGfukzxE4RnXBADgUK0TAhbwHYLfZnOqRb6qPBKkPNh5T88gxxd7Yud39oVSoKQ0hOrb8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703142105; c=relaxed/simple; bh=seEXR3JdeFClNK9FFPq61cFsRHHVAh4bcLHeLHwyeM8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=OPlc8ht3VhVT4/s6vfejhy8Ci7HYMcmsk7mMqGMmOAmoYhJrbf98F1KNKyAl20kItI1fkT0scwKro4fl6AraAYO7a+d1FnvQtPMOgpEX9Wu5zm8ORhJGsk190HfD+WqjvUUaBh9ZUtaI9FN2GNCdaMHGddYmVK2M/+FA5xd/EEg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 98FEC340BEF; Thu, 21 Dec 2023 07:01:43 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed 08/20] sim: cris: fix -Wimplicit-fallthrough warnings Date: Thu, 21 Dec 2023 02:01:15 -0500 Message-ID: <20231221070127.19142-8-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231221070127.19142-1-vapier@gentoo.org> References: <20231221070127.19142-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Replace some fall through comments with the attribute. --- sim/cris/cris-tmpl.c | 4 ++++ sim/cris/traps.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sim/cris/cris-tmpl.c b/sim/cris/cris-tmpl.c index b39583cdb207..232085cf452e 100644 --- a/sim/cris/cris-tmpl.c +++ b/sim/cris/cris-tmpl.c @@ -67,6 +67,10 @@ MY (f_break_handler) (SIM_CPU *cpu, USI breaknum, USI pc) cris_break_13_handler (cpu, /* TARGET_SYS_exit */ 1, 0, 0, 0, 0, 0, 0, pc); + /* This shouldn't be reached, but we can't mark break 13 as noreturn + since there are some calls which should return. */ + ATTRIBUTE_FALLTHROUGH; + default: abort (); } diff --git a/sim/cris/traps.c b/sim/cris/traps.c index 29b1b7cfdb38..cd4cfd9f0208 100644 --- a/sim/cris/traps.c +++ b/sim/cris/traps.c @@ -1527,7 +1527,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1, retval = TARGET_O_WRONLY; break; } - /* FALLTHROUGH */ + ATTRIBUTE_FALLTHROUGH; default: /* Nothing else is implemented. */ retval