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

Commit 67004bc4 authored by Ray Essick's avatar Ray Essick
Browse files

annotate intentional fallthroughs in switch()

also disable the temporary 'suppress the warning' flags

Bug: 118756460
Test: compilation
Change-Id: Iefeb66be13099021940ec8bce2515c62052b9304
parent 936b54b2
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);