[Android PATCH] variable set but not used

Building src/main/android/SDL_android_main.cpp with the latest Android NDK (version 8d) gives:

In function ‘void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv*, jclass, jobject)’:
jni/src/…/SDL/src/main/android/SDL_android_main.cpp:24:9: error: variable ‘status’ set but not used [-Werror=unused-but-set-variable]

Suggested patch:

Code:

diff -r 9e57ff36fd7a src/main/android/SDL_android_main.cpp
— a/src/main/android/SDL_android_main.cpp Tue Jan 08 09:30:53 2013 -0300
+++ b/src/main/android/SDL_android_main.cpp Tue Jan 08 23:50:28 2013 +0000
@@ -21,11 +21,10 @@
SDL_Android_Init(env, cls);

 /* Run the application code! */
  • int status;
    char *argv[2];
    argv[0] = strdup(“SDL_app”);
    argv[1] = NULL;
  • status = SDL_main(1, argv);
  • SDL_main(1, argv);

    /* Do not issue an exit or the whole application will terminate instead of just the SDL thread */
    //exit(status);

Cheers,
Philip.