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 <felix-coreboot@felixheld.de>
Change-Id: I08dbac8ff1f9e04770a03fb74fabf0d397b50989
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71102
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
Felix Held 2022-12-19 15:24:25 +01:00 committed by Elyes Haouas
parent 17a9849010
commit a36f4f5fc6
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ case 'm':
case 'K':
case 'k':
mem <<= 10;
/* fall through */
__fallthrough;
default:
break;
}