lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 8 Jun 2020 12:42:02 -0500
From:   "Gustavo A. R. Silva" <gustavoars@...nel.org>
To:     Mark Salter <msalter@...hat.com>,
        Aurelien Jacquiot <jacquiot.aurelien@...il.com>,
        Christian Brauner <christian.brauner@...ntu.com>
Cc:     linux-c6x-dev@...ux-c6x.org, linux-kernel@...r.kernel.org,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Subject: [PATCH] c6x: traps: Mark expected switch fall-through

Mark switch cases where we are expecting to fall through.

Fix the following warning through the use of the new the new
pseudo-keyword fallthrough;

arch/c6x/kernel/traps.c:335:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
  335 |    ie_num = 8;
      |    ~~~~~~~^~~
arch/c6x/kernel/traps.c:336:3: note: here
  336 |   default:
      |   ^~~~~~~

Reported-by: Christian Brauner <christian.brauner@...ntu.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@...nel.org>
---
 arch/c6x/kernel/traps.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/c6x/kernel/traps.c b/arch/c6x/kernel/traps.c
index 2b9121c755be1..bd0a477d3816d 100644
--- a/arch/c6x/kernel/traps.c
+++ b/arch/c6x/kernel/traps.c
@@ -333,6 +333,7 @@ asmlinkage int process_exception(struct pt_regs *regs)
 
 		case EXCEPT_TYPE_SXF:
 			ie_num = 8;
+			fallthrough;
 		default:
 			ack_exception(type_num);
 			do_trap(&iexcept_table[ie_num], regs);
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ