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

Commit 9c1c90e9 authored by Bernhard Rosenkränzer's avatar Bernhard Rosenkränzer Committed by Chih-Hung Hsieh
Browse files

Fix unused variables.



The return value of jniRegisterNativeMethods is checked only in
LOG_FATAL_IF, which defines to nothing in the LOG_NDEBUG
case.

Fake a use of the 'res' variable to shut off warnings when LOG_NDEBUG.

Change-Id: I8263610f327c56897f76796fe1fbc2b325b0559f
Signed-off-by: default avatarBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
parent 38cc84de
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -137,6 +137,7 @@ static JNINativeMethod gInputApplicationHandleMethods[] = {
int register_android_server_InputApplicationHandle(JNIEnv* env) {
    int res = jniRegisterNativeMethods(env, "com/android/server/input/InputApplicationHandle",
            gInputApplicationHandleMethods, NELEM(gInputApplicationHandleMethods));
    (void) res;  // Faked use when LOG_NDEBUG.
    LOG_FATAL_IF(res < 0, "Unable to register native methods.");

    jclass clazz;
+1 −0
Original line number Diff line number Diff line
@@ -1416,6 +1416,7 @@ static JNINativeMethod gInputManagerMethods[] = {
int register_android_server_InputManager(JNIEnv* env) {
    int res = jniRegisterNativeMethods(env, "com/android/server/input/InputManagerService",
            gInputManagerMethods, NELEM(gInputManagerMethods));
    (void) res;  // Faked use when LOG_NDEBUG.
    LOG_FATAL_IF(res < 0, "Unable to register native methods.");

    // Callbacks
+1 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ static JNINativeMethod gInputWindowHandleMethods[] = {
int register_android_server_InputWindowHandle(JNIEnv* env) {
    int res = jniRegisterNativeMethods(env, "com/android/server/input/InputWindowHandle",
            gInputWindowHandleMethods, NELEM(gInputWindowHandleMethods));
    (void) res;  // Faked use when LOG_NDEBUG.
    LOG_FATAL_IF(res < 0, "Unable to register native methods.");

    jclass clazz;
+1 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ static JNINativeMethod gPowerManagerServiceMethods[] = {
int register_android_server_PowerManagerService(JNIEnv* env) {
    int res = jniRegisterNativeMethods(env, "com/android/server/power/PowerManagerService",
            gPowerManagerServiceMethods, NELEM(gPowerManagerServiceMethods));
    (void) res;  // Faked use when LOG_NDEBUG.
    LOG_FATAL_IF(res < 0, "Unable to register native methods.");

    // Callbacks