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

Commit 6f78be2b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "annotate intentional fallthroughs in switch()"

parents c0f94f41 67004bc4
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -81,9 +81,6 @@ cc_library_shared {
        "-Wno-error=deprecated-declarations",
        "-Wunused",
        "-Wunreachable-code",
        // Allow implicit fallthroughs in android_media_MediaScanner.cpp and
        // android_mtp_MtpDatabase.cpp until they are fixed.
        "-Wno-error=implicit-fallthrough",
    ],
}

+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <nativehelper/JNIHelp.h>
#include "android_runtime/AndroidRuntime.h"
#include "android_runtime/Log.h"
#include <android-base/macros.h>                // for FALLTHROUGH_INTENDED

using namespace android;

@@ -92,6 +93,7 @@ static bool isValidUtf8(const char* bytes) {
                return false;
            }
            // Fall through to take care of the final byte.
            FALLTHROUGH_INTENDED;
        case 0x0c:
        case 0x0d:
            // Bit pattern 110x, so there is one additional byte.
+1 −0
Original line number Diff line number Diff line
@@ -1272,6 +1272,7 @@ MtpProperty* MtpDatabase::getDevicePropertyDesc(MtpDeviceProperty property) {
            case MTP_DEVICE_PROPERTY_DEVICE_FRIENDLY_NAME:
                writable = true;
                // fall through
                FALLTHROUGH_INTENDED;
            case MTP_DEVICE_PROPERTY_IMAGE_SIZE:
            {
                result = new MtpProperty(property, MTP_TYPE_STR, writable);