Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c89566d5 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh
Browse files

Suppress implicit-fallthrough warnings in nuplayer*.

Add FALLTHROUGH_INTENDED for clang compiler.

Bug: 112564944
Test: build with global -Wimplicit-fallthrough.
Change-Id: I5b7ab7abb46884b363e13284382eddf7a256a3e2
parent e91c3893
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@ cc_library_static {
    ],
    ],


    header_libs: [
    header_libs: [
        "libbase_headers",
        "libmediaplayer2_headers",
        "libmediaplayer2_headers",
        "media_plugin_headers",
        "media_plugin_headers",
    ],
    ],
+3 −3
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
//#define LOG_NDEBUG 0
//#define LOG_NDEBUG 0
#define LOG_TAG "NuPlayer2Driver"
#define LOG_TAG "NuPlayer2Driver"
#include <inttypes.h>
#include <inttypes.h>
#include <android-base/macros.h>
#include <utils/Log.h>
#include <utils/Log.h>
#include <cutils/properties.h>
#include <cutils/properties.h>


@@ -297,8 +298,7 @@ status_t NuPlayer2Driver::start_l() {
        case STATE_PREPARED:
        case STATE_PREPARED:
        {
        {
            mPlayer->start();
            mPlayer->start();

            FALLTHROUGH_INTENDED;
            // fall through
        }
        }


        case STATE_RUNNING:
        case STATE_RUNNING:
@@ -940,7 +940,7 @@ void NuPlayer2Driver::notifyListener_l(
                    mPlayer->pause();
                    mPlayer->pause();
                    mState = STATE_PAUSED;
                    mState = STATE_PAUSED;
                }
                }
                // fall through
                FALLTHROUGH_INTENDED;
            }
            }


            case MEDIA2_ERROR:
            case MEDIA2_ERROR:
+5 −4
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
//#define LOG_NDEBUG 0
//#define LOG_NDEBUG 0
#define LOG_TAG "NuPlayerDriver"
#define LOG_TAG "NuPlayerDriver"
#include <inttypes.h>
#include <inttypes.h>
#include <android-base/macros.h>
#include <utils/Log.h>
#include <utils/Log.h>
#include <cutils/properties.h>
#include <cutils/properties.h>


@@ -344,7 +345,7 @@ status_t NuPlayerDriver::start_l() {


            CHECK_EQ(mState, STATE_PREPARED);
            CHECK_EQ(mState, STATE_PREPARED);


            // fall through
            FALLTHROUGH_INTENDED;
        }
        }


        case STATE_PAUSED:
        case STATE_PAUSED:
@@ -353,7 +354,7 @@ status_t NuPlayerDriver::start_l() {
        {
        {
            mPlayer->start();
            mPlayer->start();


            // fall through
            FALLTHROUGH_INTENDED;
        }
        }


        case STATE_RUNNING:
        case STATE_RUNNING:
@@ -382,7 +383,7 @@ status_t NuPlayerDriver::stop() {
    switch (mState) {
    switch (mState) {
        case STATE_RUNNING:
        case STATE_RUNNING:
            mPlayer->pause();
            mPlayer->pause();
            // fall through
            FALLTHROUGH_INTENDED;


        case STATE_PAUSED:
        case STATE_PAUSED:
            mState = STATE_STOPPED;
            mState = STATE_STOPPED;
@@ -991,7 +992,7 @@ void NuPlayerDriver::notifyListener_l(
                mPlayer->pause();
                mPlayer->pause();
                mState = STATE_PAUSED;
                mState = STATE_PAUSED;
            }
            }
            // fall through
            FALLTHROUGH_INTENDED;
        }
        }


        case MEDIA_ERROR:
        case MEDIA_ERROR: