summaryrefslogtreecommitdiffstats
path: root/libpixelflinger
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-09-13 11:08:41 -0700
committerChih-hung Hsieh <chh@google.com>2018-09-17 16:50:11 +0000
commit502f4864d6c92fce4cb0e4f7f2b12d7124da902b (patch)
treeb34cb377a8a6543fb0baf68e566b120209b3aaf9 /libpixelflinger
parentc2501fda600ea2067099c1de042e3db7acde74ee (diff)
downloadsystem_core-502f4864d6c92fce4cb0e4f7f2b12d7124da902b.tar.gz
system_core-502f4864d6c92fce4cb0e4f7f2b12d7124da902b.tar.bz2
system_core-502f4864d6c92fce4cb0e4f7f2b12d7124da902b.zip
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')
-rw-r--r--libpixelflinger/Android.mk1
-rw-r--r--libpixelflinger/buffer.cpp9
-rw-r--r--libpixelflinger/codeflinger/blending.cpp3
3 files changed, 10 insertions, 3 deletions
diff --git a/libpixelflinger/Android.mk b/libpixelflinger/Android.mk
index 14883f46a..8c80f6a65 100644
--- a/libpixelflinger/Android.mk
+++ b/libpixelflinger/Android.mk
@@ -73,6 +73,7 @@ LOCAL_SRC_FILES_mips64 := $(PIXELFLINGER_SRC_FILES_mips64)
LOCAL_CFLAGS := $(PIXELFLINGER_CFLAGS)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_C_INCLUDES += $(LOCAL_EXPORT_C_INCLUDE_DIRS)
+LOCAL_HEADER_LIBRARIES := libbase_headers
LOCAL_SHARED_LIBRARIES := libcutils liblog libutils
include $(BUILD_SHARED_LIBRARY)
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;
}
diff --git a/libpixelflinger/codeflinger/blending.cpp b/libpixelflinger/codeflinger/blending.cpp
index a55dfe3dd..2cbb00f83 100644
--- a/libpixelflinger/codeflinger/blending.cpp
+++ b/libpixelflinger/codeflinger/blending.cpp
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <sys/types.h>
+#include <android-base/macros.h>
#include <log/log.h>
#include "GGLAssembler.h"
@@ -301,7 +302,7 @@ void GGLAssembler::build_blend_factor(
return;
}
}
- // fall-through...
+ FALLTHROUGH_INTENDED;
case GGL_ONE_MINUS_DST_COLOR:
case GGL_DST_COLOR:
case GGL_ONE_MINUS_SRC_COLOR: