Suppress implicit-fallthrough warnings in mpeg2.
Add FALLTHROUGH_INTENDED for clang compiler.
Bug: 112564944
Test: build with global -Wimplicit-fallthrough.
Change-Id: Ibf9aa0c2bf6ca13dbe96662061cb26b66e9e10d6
diff --git a/media/extractors/mpeg2/Android.bp b/media/extractors/mpeg2/Android.bp
index 5e4a592..40314dc 100644
--- a/media/extractors/mpeg2/Android.bp
+++ b/media/extractors/mpeg2/Android.bp
@@ -25,6 +25,10 @@
"libstagefright_foundation",
],
+ header_libs: [
+ "libbase_headers",
+ ],
+
static_libs: [
"libstagefright_mpeg2support",
"libutils",
diff --git a/media/extractors/mpeg2/MPEG2TSExtractor.cpp b/media/extractors/mpeg2/MPEG2TSExtractor.cpp
index c83f7ce..9191386 100644
--- a/media/extractors/mpeg2/MPEG2TSExtractor.cpp
+++ b/media/extractors/mpeg2/MPEG2TSExtractor.cpp
@@ -20,6 +20,8 @@
#include <inttypes.h>
#include <utils/Log.h>
+#include <android-base/macros.h>
+
#include "MPEG2TSExtractor.h"
#include <media/DataSourceBase.h>
@@ -508,7 +510,7 @@
case MediaTrack::ReadOptions::SEEK_CLOSEST:
ALOGW("seekMode not supported: %d; falling back to PREVIOUS_SYNC",
seekMode);
- // fall-through
+ FALLTHROUGH_INTENDED;
case MediaTrack::ReadOptions::SEEK_PREVIOUS_SYNC:
if (index == 0) {
ALOGW("Previous sync not found; starting from the earliest "