diff options
author | Simon Glass <sjg@chromium.org> | 2021-06-20 09:58:59 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-27 07:46:55 +0000 |
commit | 44826c7a47c4ee1300ae46d031ca81ffad596d09 (patch) | |
tree | f364b4fda8640c8d50075c1111a4da5e6b944091 | |
parent | 51ca8532a387ce70564beb5445d43422a637f04a (diff) | |
download | vboot-44826c7a47c4ee1300ae46d031ca81ffad596d09.tar.gz |
Allow use of fallthrough directlystabilize-14189.B
There is a standard way of handling fallthrough, at least in linux and
U-Boot, of defining 'fallthrough' as the required attribute. At
present, vboot always defines this itself, which is incompatible with
this convention.
Use double underscores around the definition of VBOOT_FALLTHROUGH to
maintain compatibility.
BUG=b:191646387
BRANCH=none
TEST=FEATURES=test sudo -E emerge vboot_reference
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Id62f126f77311360fb7859ee956f1476378d87c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3032350
Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r-- | firmware/2lib/include/2common.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/2lib/include/2common.h b/firmware/2lib/include/2common.h index 918c50dd..181cf4c1 100644 --- a/firmware/2lib/include/2common.h +++ b/firmware/2lib/include/2common.h @@ -86,10 +86,10 @@ struct vb2_public_key; #endif #if (defined(__GNUC__) && __GNUC__ >= 7) -#define VBOOT_FALLTHROUGH __attribute__((fallthrough)) +#define VBOOT_FALLTHROUGH __attribute__((__fallthrough__)) #elif defined(__clang__) -#if __has_attribute(fallthrough) -#define VBOOT_FALLTHROUGH __attribute__((fallthrough)) +#if __has_attribute(__fallthrough__) +#define VBOOT_FALLTHROUGH __attribute__((__fallthrough__)) #endif #else #define VBOOT_FALLTHROUGH ((void)0) |