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

Commit 16fef65f authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by Gerrit Code Review
Browse files

Merge "Suppress implicit-fallthrough warnings."

parents c2501fda 502f4864
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -170,7 +170,9 @@ void UNUSED(const T&...) {
//
//  In either case this macro has no effect on runtime behavior and performance
//  of code.
#ifndef FALLTHROUGH_INTENDED
#define FALLTHROUGH_INTENDED [[clang::fallthrough]]  // NOLINT
#endif

// Current ABI string
#if defined(__arm__)
+2 −1
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include <string>

#include <android-base/file.h>
#include <android-base/macros.h>
#include <android-base/stringprintf.h>
#ifdef __ANDROID__  // includes sys/properties.h which does not exist outside
#include <cutils/properties.h>
@@ -2516,7 +2517,7 @@ static int android_log_buffer_to_string(const char* msg, size_t len,
#endif
        elem.data.string = const_cast<char*>("<unknown>");
        elem.len = strlen(elem.data.string);
      /* FALLTHRU */
        FALLTHROUGH_INTENDED;
      case EVENT_TYPE_STRING:
        if (elem.len <= strOutLen) {
          memcpy(strOut, elem.data.string, elem.len);
+1 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ LOCAL_SRC_FILES_mips64 := $(PIXELFLINGER_SRC_FILES_mips64)
LOCAL_CFLAGS := $(PIXELFLINGER_CFLAGS)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_C_INCLUDES += $(LOCAL_EXPORT_C_INCLUDE_DIRS)
LOCAL_HEADER_LIBRARIES := libbase_headers
LOCAL_SHARED_LIBRARIES := libcutils liblog libutils

include $(BUILD_SHARED_LIBRARY)
+7 −2
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@

#include <assert.h>

#include <android-base/macros.h>

#include "buffer.h"

namespace android {
@@ -266,8 +268,11 @@ uint32_t ggl_pack_color(context_t* c, int32_t format,
    p = downshift_component(p, b,   hbits, lbits,  f->bh, f->bl, 0, 1, -1);
    p = downshift_component(p, a,   hbits, lbits,  f->ah, f->al, 0, 1, -1);
    switch (f->size) {
    case 1: p |= p << 8;    // fallthrough
    case 2: p |= p << 16;
        case 1:
            p |= p << 8;
            FALLTHROUGH_INTENDED;
        case 2:
            p |= p << 16;
    }
    return p;
}
+2 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <sys/types.h>

#include <android-base/macros.h>
#include <log/log.h>

#include "GGLAssembler.h"
@@ -301,7 +302,7 @@ void GGLAssembler::build_blend_factor(
                return;
            }                
        }
        // fall-through...
        FALLTHROUGH_INTENDED;
    case GGL_ONE_MINUS_DST_COLOR:
    case GGL_DST_COLOR:
    case GGL_ONE_MINUS_SRC_COLOR:
Loading