From a36f4f5fc63a245c1d00783928873667f19bd9ba Mon Sep 17 00:00:00 2001 From: Felix Held Date: Mon, 19 Dec 2022 15:24:25 +0100 Subject: [PATCH] doc/contributing/coding_style: change example to use __fallthrough While the fall through comment is sufficient for gcc to notice that the fall-through is intentional, clang requires a special attribute which also works for gcc. Update the documentation to use this attribute instead of the comment. Signed-off-by: Felix Held Change-Id: I08dbac8ff1f9e04770a03fb74fabf0d397b50989 Reviewed-on: https://review.coreboot.org/c/coreboot/+/71102 Reviewed-by: Arthur Heymans Reviewed-by: Elyes Haouas Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Felix Singer --- Documentation/contributing/coding_style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/contributing/coding_style.md b/Documentation/contributing/coding_style.md index a0604c9d43..6bf530de20 100644 --- a/Documentation/contributing/coding_style.md +++ b/Documentation/contributing/coding_style.md @@ -66,7 +66,7 @@ case 'm': case 'K': case 'k': mem <<= 10; - /* fall through */ + __fallthrough; default: break; }