Merge "Suppress implicit-fallthrough warnings in stagefright."

gugelfrei
Treehugger Robot 6 years ago committed by Gerrit Code Review
commit 70f03120d7

@ -366,13 +366,13 @@ int main(int argc, char **argv) {
case 'T':
{
useTimestamp = true;
FALLTHROUGH_INTENDED;
}
// fall through
case 'R':
{
renderSurface = true;
FALLTHROUGH_INTENDED;
}
// fall through
case 'S':
{
useSurface = true;

@ -706,13 +706,13 @@ int main(int argc, char **argv) {
case 'T':
{
useTimestamp = true;
FALLTHROUGH_INTENDED;
}
// fall through
case 'R':
{
renderSurface = true;
FALLTHROUGH_INTENDED;
}
// fall through
case 'S':
{
useSurface = true;

@ -1619,7 +1619,7 @@ status_t ACodec::freeBuffer(OMX_U32 portIndex, size_t i) {
if (portIndex == kPortIndexOutput && mNativeWindow != NULL) {
(void)cancelBufferToNativeWindow(info);
}
// fall through
FALLTHROUGH_INTENDED;
case BufferInfo::OWNED_BY_NATIVE_WINDOW:
err = mOMXNode->freeBuffer(portIndex, info->mBufferID);
@ -5019,6 +5019,7 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
}
}
// Fall through to set up mime.
FALLTHROUGH_INTENDED;
}
default:
@ -7849,7 +7850,7 @@ bool ACodec::OutputPortSettingsChangedState::onMessageReceived(
msg->setInt32("generation", mCodec->mStateGeneration);
msg->post(3000000);
}
// fall-through
FALLTHROUGH_INTENDED;
}
case kWhatResume:
case kWhatSetParameters:

@ -1821,8 +1821,8 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
// the shutdown complete notification. If we
// don't, we'll timeout and force release.
sendErrorResponse = false;
FALLTHROUGH_INTENDED;
}
// fall-thru
case STOPPING:
{
if (mFlags & kFlagSawMediaServerDie) {

@ -30,6 +30,7 @@ cc_library_shared {
"liblog",
],
header_libs: ["libbase_headers"],
static_libs: ["libFLAC"],
name: "libstagefright_soft_flacenc",

@ -16,6 +16,7 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "SoftFlacEncoder"
#include <android-base/macros.h>
#include <utils/Log.h>
#include "SoftFlacEncoder.h"
@ -335,7 +336,7 @@ OMX_ERRORTYPE SoftFlacEncoder::internalSetParameter(
}
}
// fall through
FALLTHROUGH_INTENDED;
}
default:

@ -21,6 +21,7 @@
#include "SoftVP8Encoder.h"
#include "SoftVP9Encoder.h"
#include <android-base/macros.h>
#include <utils/Log.h>
#include <utils/misc.h>
@ -557,7 +558,7 @@ vpx_enc_frame_flags_t SoftVPXEncoder::getEncodeFlags() {
break;
case kTemporalUpdateGoldenWithoutDependency:
flags |= VP8_EFLAG_NO_REF_GF;
// Deliberately no break here.
FALLTHROUGH_INTENDED;
case kTemporalUpdateGolden:
flags |= VP8_EFLAG_NO_REF_ARF;
flags |= VP8_EFLAG_NO_UPD_ARF;
@ -566,14 +567,14 @@ vpx_enc_frame_flags_t SoftVPXEncoder::getEncodeFlags() {
case kTemporalUpdateAltrefWithoutDependency:
flags |= VP8_EFLAG_NO_REF_ARF;
flags |= VP8_EFLAG_NO_REF_GF;
// Deliberately no break here.
FALLTHROUGH_INTENDED;
case kTemporalUpdateAltref:
flags |= VP8_EFLAG_NO_UPD_GF;
flags |= VP8_EFLAG_NO_UPD_LAST;
break;
case kTemporalUpdateNoneNoRefAltref:
flags |= VP8_EFLAG_NO_REF_ARF;
// Deliberately no break here.
FALLTHROUGH_INTENDED;
case kTemporalUpdateNone:
flags |= VP8_EFLAG_NO_UPD_GF;
flags |= VP8_EFLAG_NO_UPD_ARF;

@ -16,6 +16,7 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "ColorConverter"
#include <android-base/macros.h>
#include <utils/Log.h>
#include <media/stagefright/foundation/ADebug.h>
@ -62,7 +63,7 @@ bool ColorConverter::isValid() const {
if (mDstFormat == OMX_COLOR_FormatYUV444Y410) {
return true;
}
// fall-thru
FALLTHROUGH_INTENDED;
case OMX_COLOR_FormatYUV420Planar:
return mDstFormat == OMX_COLOR_Format16bitRGB565
|| mDstFormat == OMX_COLOR_Format32BitRGBA8888

@ -46,6 +46,10 @@ cc_library {
"android.hardware.cas.native@1.0",
],
header_libs: [
"libbase_headers",
],
static_libs: [
"libstagefright_id3",
"libstagefright_metadatautils",

@ -16,6 +16,7 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "PlaylistFetcher"
#include <android-base/macros.h>
#include <utils/Log.h>
#include <utils/misc.h>
@ -267,7 +268,7 @@ int64_t PlaylistFetcher::delayUsToRefreshPlaylist() const {
break;
}
// fall through
FALLTHROUGH_INTENDED;
}
case FIRST_UNCHANGED_RELOAD_ATTEMPT:

@ -29,6 +29,7 @@ cc_library_shared {
],
header_libs: [
"libbase_headers",
"media_plugin_headers",
],

@ -16,6 +16,7 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "OMXNodeInstance"
#include <android-base/macros.h>
#include <utils/Log.h>
#include <inttypes.h>
@ -459,7 +460,7 @@ status_t OMXNodeInstance::freeNode() {
break;
}
// fall through
FALLTHROUGH_INTENDED;
}
case OMX_StateIdle:
@ -486,7 +487,7 @@ status_t OMXNodeInstance::freeNode() {
}
CHECK_EQ(err, OMX_ErrorNone);
// fall through
FALLTHROUGH_INTENDED;
}
case OMX_StateLoaded:
@ -2192,8 +2193,8 @@ void OMXNodeInstance::onEvent(
// bump internal-state debug level for 2 input and output frames
Mutex::Autolock _l(mDebugLock);
bumpDebugLevel_l(2 /* numInputBuffers */, 2 /* numOutputBuffers */);
FALLTHROUGH_INTENDED;
}
// fall through
default:
arg2String = portString(arg2);
}
@ -2204,7 +2205,7 @@ void OMXNodeInstance::onEvent(
break;
case OMX_EventPortSettingsChanged:
arg2String = asString((OMX_INDEXEXTTYPE)arg2);
// fall through
FALLTHROUGH_INTENDED;
default:
arg1String = portString(arg1);
}

@ -19,6 +19,7 @@
#include <string.h>
#include <android-base/macros.h>
#include <media/stagefright/omx/OMXUtils.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AUtils.h>
@ -273,6 +274,7 @@ bool DescribeDefaultColorFormat(DescribeColorFormat2Params &params) {
break;
} else {
// fall through as YV12 is used for YUV420Planar by some codecs
FALLTHROUGH_INTENDED;
}
case OMX_COLOR_FormatYUV420Planar:

@ -27,6 +27,10 @@ cc_test {
"frameworks/native/include/media/openmax",
],
header_libs: [
"libbase_headers",
],
cflags: [
"-Werror",
"-Wall",

@ -17,6 +17,7 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "OMXHarness"
#include <inttypes.h>
#include <android-base/macros.h>
#include <utils/Log.h>
#include "OMXHarness.h"
@ -844,7 +845,7 @@ int main(int argc, char **argv) {
case '?':
fprintf(stderr, "\n");
// fall through
FALLTHROUGH_INTENDED;
case 'h':
default:

@ -19,6 +19,10 @@ cc_library_shared {
"libstagefright_omx_utils",
],
header_libs: [
"libbase_headers",
],
cflags: [
"-Werror",
"-Wall",

@ -19,6 +19,7 @@
#include <media/stagefright/xmlparser/MediaCodecsXmlParser.h>
#include <android-base/macros.h>
#include <utils/Log.h>
#include <media/stagefright/MediaErrors.h>
#include <media/stagefright/omx/OMXUtils.h>
@ -340,7 +341,7 @@ void MediaCodecsXmlParser::startElementHandler(
}
}
inType = false;
// fall through
FALLTHROUGH_INTENDED;
case SECTION_DECODER_TYPE:
case SECTION_ENCODER_TYPE:

Loading…
Cancel
Save