From patchwork Thu Dec 21 07:01:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82648 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 62B6538708AA for ; Thu, 21 Dec 2023 07:02:29 +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 D9EAF384DB5E for ; Thu, 21 Dec 2023 07:01:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9EAF384DB5E 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 D9EAF384DB5E 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=1703142103; cv=none; b=DPAcRpvD6r0vQmzVzQ9TZFy/JozrtDWCOTrQ2wLnRv0YHD8jB9sePY7crvpseYbbnrlRE4ov00ysmcdjJ1xsZwDl1z5qpvq4URaM0vX4XvB6/sqaMKJA4zBzY7InbpKmE1KJCJKJ5cjWtSSubzCuvjLb1Ljeg5Qr8IOsFFQwtew= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703142103; c=relaxed/simple; bh=V8g1E8NHb4rB/ETLBEnHk6AVnc3mVTDr2RKbLPzHoWI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=MPMAk4PfvgpdszfizK+5J55rvXIhb3VlyYFnDZpbM/xj4EsbKe+WoWm0extm1s+FcBvj1yi/O7bA3YtnXnoSKcY8RiPOb/CUc+92rDR60SlerMIe/rQwzjvwf5mEVaTxxhAMo+oxiEivSb8Ievje94g8Ou5LXgJH3Yzv7RDPv9Y= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 8B500340943; Thu, 21 Dec 2023 07:01:41 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed 07/20] sim: bfin: fix -Wimplicit-fallthrough warnings Date: Thu, 21 Dec 2023 02:01:14 -0500 Message-ID: <20231221070127.19142-7-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 Add the attribute to places where we want to fall thru. --- sim/bfin/dv-bfin_dma.c | 1 + sim/bfin/dv-bfin_twi.c | 1 + sim/bfin/dv-bfin_uart2.c | 1 + sim/bfin/interp.c | 2 ++ 4 files changed, 5 insertions(+) diff --git a/sim/bfin/dv-bfin_dma.c b/sim/bfin/dv-bfin_dma.c index a3384700b2bf..4d2b95d24836 100644 --- a/sim/bfin/dv-bfin_dma.c +++ b/sim/bfin/dv-bfin_dma.c @@ -173,6 +173,7 @@ bfin_dma_process_desc (struct hw *me, struct bfin_dma *dma) dma->ndph = _flows[1]; --ndsize; ++flows; + ATTRIBUTE_FALLTHROUGH; case DMAFLOW_SMALL: dma->ndpl = _flows[0]; --ndsize; diff --git a/sim/bfin/dv-bfin_twi.c b/sim/bfin/dv-bfin_twi.c index 0ea224ca63cb..5a25320cb10c 100644 --- a/sim/bfin/dv-bfin_twi.c +++ b/sim/bfin/dv-bfin_twi.c @@ -118,6 +118,7 @@ bfin_twi_io_write_buffer (struct hw *me, const void *source, int space, break; case mmr_offset(xmt_data8): value &= 0xff; + ATTRIBUTE_FALLTHROUGH; case mmr_offset(xmt_data16): twi->xmt_fifo = value; break; diff --git a/sim/bfin/dv-bfin_uart2.c b/sim/bfin/dv-bfin_uart2.c index 0b55a30a55d3..5c8a50659b3c 100644 --- a/sim/bfin/dv-bfin_uart2.c +++ b/sim/bfin/dv-bfin_uart2.c @@ -158,6 +158,7 @@ bfin_uart_io_read_buffer (struct hw *me, void *dest, case mmr_offset(lsr): uart->lsr &= ~(DR | THRE | TEMT); uart->lsr |= bfin_uart_get_status (me); + ATTRIBUTE_FALLTHROUGH; case mmr_offset(thr): case mmr_offset(msr): case mmr_offset(dll): diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index df1d1b3f70f2..bb0b83c01c2f 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -396,12 +396,14 @@ bfin_syscall (SIM_CPU *cpu) goto sys_finish; case CB_SYS_setuid: sc.arg1 &= 0xffff; + ATTRIBUTE_FALLTHROUGH; case CB_SYS_setuid32: tbuf += sprintf (tbuf, "setuid(%u)", args[0]); sc.result = setuid (sc.arg1); goto sys_finish; case CB_SYS_setgid: sc.arg1 &= 0xffff; + ATTRIBUTE_FALLTHROUGH; case CB_SYS_setgid32: tbuf += sprintf (tbuf, "setgid(%u)", args[0]); sc.result = setgid (sc.arg1);