Merge "Use -Werror in development"
This commit is contained in:
@@ -41,8 +41,7 @@ LOCAL_STATIC_LIBRARIES :=
|
||||
LOCAL_C_INCLUDES += \
|
||||
$(JNI_H_INCLUDE)
|
||||
|
||||
# No special compiler flags.
|
||||
LOCAL_CFLAGS +=
|
||||
LOCAL_CFLAGS := -Wall -Werror
|
||||
|
||||
LOCAL_CXX_STL := none
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "jni.h"
|
||||
|
||||
static jint
|
||||
add(JNIEnv *env, jobject thiz, jint a, jint b) {
|
||||
add(JNIEnv* /*env*/, jobject /*thiz*/, jint a, jint b) {
|
||||
int result = a + b;
|
||||
ALOGI("%d + %d = %d", a, b, result);
|
||||
return result;
|
||||
@@ -82,7 +82,7 @@ typedef union {
|
||||
void* venv;
|
||||
} UnionJNIEnvToVoid;
|
||||
|
||||
jint JNI_OnLoad(JavaVM* vm, void* reserved)
|
||||
jint JNI_OnLoad(JavaVM* vm, void* /*reserved*/)
|
||||
{
|
||||
UnionJNIEnvToVoid uenv;
|
||||
uenv.venv = NULL;
|
||||
|
||||
@@ -88,7 +88,7 @@ main(int argc, char** argv)
|
||||
len -= amt2;
|
||||
}
|
||||
|
||||
ftruncate(fd, 0);
|
||||
(void)ftruncate(fd, 0);
|
||||
lseek(fd, 0, SEEK_SET);
|
||||
while (root) {
|
||||
ssize_t amt2 = strlen(root->buf);
|
||||
|
||||
@@ -15,12 +15,15 @@
|
||||
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
MoarRam_jni_cflags := -Wall -Werror -Wno-unused-parameter
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE := libmoarram-32
|
||||
LOCAL_SRC_FILES := foo.c
|
||||
LOCAL_SHARED_LIBRARIES += liblog
|
||||
LOCAL_CFLAGS := $(MoarRam_jni_cflags)
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -30,6 +33,7 @@ LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE := libmoarram-2M
|
||||
LOCAL_SRC_FILES := bar.c
|
||||
LOCAL_SHARED_LIBRARIES += liblog
|
||||
LOCAL_CFLAGS := $(MoarRam_jni_cflags)
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -39,6 +43,7 @@ LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE := libmoarram-17_71
|
||||
LOCAL_SRC_FILES := baz.c
|
||||
LOCAL_SHARED_LIBRARIES += liblog
|
||||
LOCAL_CFLAGS := $(MoarRam_jni_cflags)
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -48,5 +53,6 @@ LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE := libmoarram-doublefree
|
||||
LOCAL_SRC_FILES := df.c
|
||||
LOCAL_SHARED_LIBRARIES += liblog
|
||||
LOCAL_CFLAGS := $(MoarRam_jni_cflags)
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
Reference in New Issue
Block a user