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

Commit 0626ec58 authored by Andreas Gampe's avatar Andreas Gampe Committed by Gerrit Code Review
Browse files

Merge "Frameworks/base: Wall Werror in core/jni"

parents 537888be 0f0b4919
Loading
Loading
Loading
Loading
+226 −224
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ LOCAL_SHARED_LIBRARIES := \
    libsoundtrigger \
    libminikin \
    libprocessgroup \
	libnativebridge \
    libnativebridge

ifeq ($(USE_OPENGL_RENDERER),true)
    LOCAL_SHARED_LIBRARIES += libhwui
@@ -261,6 +261,8 @@ LOCAL_C_INCLUDES += bionic/libc/private

LOCAL_MODULE:= libandroid_runtime

LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code

include $(BUILD_SHARED_LIBRARY)

include $(call all-makefiles-under,$(LOCAL_PATH))
+0 −13
Original line number Diff line number Diff line
@@ -191,12 +191,6 @@ extern int register_com_android_internal_util_VirtualRefBasePtr(JNIEnv *env);

static AndroidRuntime* gCurRuntime = NULL;

static void doThrow(JNIEnv* env, const char* exc, const char* msg = NULL)
{
    if (jniThrowException(env, exc, msg) != 0)
        assert(false);
}

/*
 * Code written in the Java Programming Language calls here from main().
 */
@@ -1214,13 +1208,6 @@ static int register_jni_procs(const RegJNIRec array[], size_t count, JNIEnv* env
    return 0;
}

static void register_jam_procs(const RegJAMProc array[], size_t count)
{
    for (size_t i = 0; i < count; i++) {
        array[i]();
    }
}

static const RegJNIRec gRegJNI[] = {
    REG_JNI(register_com_android_internal_os_RuntimeInit),
    REG_JNI(register_android_os_SystemClock),
+0 −1
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ public:
    }

    virtual size_t read(void* buffer, size_t size) {
        JNIEnv* env = fEnv;
        if (NULL == buffer) {
            if (0 == size) {
                return 0;
+0 −12
Original line number Diff line number Diff line
@@ -26,18 +26,6 @@

namespace android {

// Do an sprintf starting at offset n, abort on overflow
static int snprintfcat(char* buf, int off, int size, const char* format, ...)
        __attribute__((__format__(__printf__, 4, 5)));
static int snprintfcat(char* buf, int off, int size, const char* format, ...) {
    va_list args;
    va_start(args, format);
    int n = vsnprintf(buf + off, size - off, format, args);
    LOG_ALWAYS_FATAL_IF(n >= size - off, "String overflow in setting layout properties");
    va_end(args);
    return off + n;
}

void MinikinUtils::doLayout(Layout* layout, const Paint* paint, int bidiFlags, TypefaceImpl* typeface,
        const uint16_t* buf, size_t start, size_t count, size_t bufSize) {
    TypefaceImpl* resolvedFace = TypefaceImpl_resolveDefault(typeface);
+0 −5
Original line number Diff line number Diff line
@@ -13,11 +13,6 @@

using namespace android::uirenderer;

static struct {
    jclass clazz;
    jfieldID shader;
} gShaderClassInfo;

static void ThrowIAE_IfNull(JNIEnv* env, void* ptr) {
    if (NULL == ptr) {
        doThrowIAE(env);
Loading