diff --git a/Android.mk b/Android.mk index 9ce879a11..043576c1a 100644 --- a/Android.mk +++ b/Android.mk @@ -53,6 +53,22 @@ LOCAL_SRC_FILES := \ LOCAL_SHARED_LIBRARIES := hidapi LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES +LOCAL_CFLAGS += \ + -Wall -Wextra \ + -Wdocumentation \ + -Wdocumentation-unknown-command \ + -Wmissing-prototypes \ + -Wunreachable-code-break \ + -Wunneeded-internal-declaration \ + -Wmissing-variable-declarations \ + -Wfloat-conversion \ + -Wshorten-64-to-32 \ + -Wunreachable-code-return + +# Warnings we haven't fixed (yet) +LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare + + LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid ifeq ($(NDK_DEBUG),1) diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c index 2c6115fd9..1ccfe6776 100644 --- a/src/core/android/SDL_android.c +++ b/src/core/android/SDL_android.c @@ -1261,7 +1261,7 @@ int Android_JNI_CaptureAudioBuffer(void *buffer, int buflen) { JNIEnv *env = Android_JNI_GetEnv(); jboolean isCopy = JNI_FALSE; - jint br; + jint br = -1; switch (captureBufferFormat) { case ENCODING_PCM_8BIT: