diff options
author | Chih-Hung Hsieh <chh@google.com> | 2018-09-13 11:08:41 -0700 |
---|---|---|
committer | Chih-hung Hsieh <chh@google.com> | 2018-09-17 16:50:11 +0000 |
commit | 502f4864d6c92fce4cb0e4f7f2b12d7124da902b (patch) | |
tree | b34cb377a8a6543fb0baf68e566b120209b3aaf9 /libpixelflinger/buffer.cpp | |
parent | c2501fda600ea2067099c1de042e3db7acde74ee (diff) |
Suppress implicit-fallthrough warnings.
Add FALLTHROUGH_INTENDED for clang compiler.
Bug: 112564944
Test: build with global -Wimplicit-fallthrough.
Change-Id: I40f8bbf94e207c9dd90921e9b762ba51abab5777
Diffstat (limited to 'libpixelflinger/buffer.cpp')
-rw-r--r-- | libpixelflinger/buffer.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libpixelflinger/buffer.cpp b/libpixelflinger/buffer.cpp index dcb95c5a2..ea9514ca4 100644 --- a/libpixelflinger/buffer.cpp +++ b/libpixelflinger/buffer.cpp @@ -18,6 +18,8 @@ #include <assert.h> +#include <android-base/macros.h> + #include "buffer.h" namespace android { @@ -266,8 +268,11 @@ uint32_t ggl_pack_color(context_t* c, int32_t format, p = downshift_component(p, b, hbits, lbits, f->bh, f->bl, 0, 1, -1); p = downshift_component(p, a, hbits, lbits, f->ah, f->al, 0, 1, -1); switch (f->size) { - case 1: p |= p << 8; // fallthrough - case 2: p |= p << 16; + case 1: + p |= p << 8; + FALLTHROUGH_INTENDED; + case 2: + p |= p << 16; } return p; } |