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

Commit 809bcd1e authored by Aurimas Liutikas's avatar Aurimas Liutikas Committed by android-build-merger
Browse files

Merge "Fix a set of random warnings in frameworks/base/" into nyc-dev am: 359df40a

am: abf9e569

* commit 'abf9e569':
  Fix a set of random warnings in frameworks/base/
parents db7df8c9 abf9e569
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,6 +18,6 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_MODULE := libhidcommand_jni
LOCAL_MODULE_TAGS := optional

LOCAL_CFLAGS += -Wall
LOCAL_CFLAGS += -Wall -Wextra -Werror

include $(BUILD_SHARED_LIBRARY)
+4 −4
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ static struct {
    jmethodID onDeviceError;
} gDeviceCallbackClassInfo;

static int handleLooperEvents(int fd, int events, void* data) {
static int handleLooperEvents(int /* fd */, int events, void* data) {
    Device* d = reinterpret_cast<Device*>(data);
    return d->handleEvents(events);
}
@@ -183,7 +183,7 @@ std::unique_ptr<uint8_t[]> getData(JNIEnv* env, jbyteArray javaArray, size_t& ou
    return data;
}

static jlong openDevice(JNIEnv* env, jclass clazz, jstring rawName, jint id, jint vid, jint pid,
static jlong openDevice(JNIEnv* env, jclass /* clazz */, jstring rawName, jint id, jint vid, jint pid,
        jbyteArray rawDescriptor, jobject queue, jobject callback) {
    ScopedUtfChars name(env, rawName);
    if (name.c_str() == nullptr) {
@@ -202,7 +202,7 @@ static jlong openDevice(JNIEnv* env, jclass clazz, jstring rawName, jint id, jin
    return reinterpret_cast<jlong>(d);
}

static void sendReport(JNIEnv* env, jclass clazz, jlong ptr,jbyteArray rawReport) {
static void sendReport(JNIEnv* env, jclass /* clazz */, jlong ptr,jbyteArray rawReport) {
    size_t size;
    std::unique_ptr<uint8_t[]> report = getData(env, rawReport, size);
    uhid::Device* d = reinterpret_cast<uhid::Device*>(ptr);
@@ -211,7 +211,7 @@ static void sendReport(JNIEnv* env, jclass clazz, jlong ptr,jbyteArray rawReport
    }
}

static void closeDevice(JNIEnv* env, jclass clazz, jlong ptr) {
static void closeDevice(JNIEnv* /* env */, jclass /* clazz */, jlong ptr) {
    uhid::Device* d = reinterpret_cast<uhid::Device*>(ptr);
    if (d) {
        delete d;
+2 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ LOCAL_SRC_FILES := \
LOCAL_SHARED_LIBRARIES := \
    libnativehelper

LOCAL_CFLAGS += -Wall -Werror

LOCAL_MODULE := libframeworks_coretests_jni

# this does not prevent build system
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ int register_com_android_frameworks_coretests_JNITests(JNIEnv* env) {
/*
 * JNI Initialization
 */
jint JNI_OnLoad(JavaVM *jvm, void *reserved) {
jint JNI_OnLoad(JavaVM *jvm, void */* reserved */) {
    JNIEnv *e;
    int status;

+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ LOCAL_SRC_FILES:= \
# All of the shard libraries we link against.
LOCAL_SHARED_LIBRARIES := liblog

LOCAL_CFLAGS += -Wall -Wextra -Werror

# Also need the JNI headers.
LOCAL_C_INCLUDES += \
	$(JNI_H_INCLUDE)
Loading