From fd9c0e39561a404989f28e3df775296292d64a05 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Thu, 12 Feb 2015 10:43:22 +0100 Subject: [PATCH] Enable -Wall -Werror for the whole Android project, and disable warnings for external depencies --- jni/Application.mk | 6 +++++- submodules/belle-sip | 2 +- submodules/externals/build/antlr3/Android.mk | 3 +++ submodules/externals/build/ffmpeg/Android.mk | 3 +++ submodules/externals/build/gsm/Android.mk | 3 +++ submodules/externals/build/libmatroska/Android.mk | 3 +++ submodules/externals/build/libupnp/Android.mk | 3 +++ submodules/externals/build/libxml2/Android.mk | 3 +++ submodules/externals/build/opencore-amr/Android.mk | 3 +++ submodules/externals/build/opus/Android.mk | 5 ++++- submodules/externals/build/speex/Android.mk | 12 +++++++----- submodules/externals/build/vo-amrwbenc/Android.mk | 3 +++ submodules/externals/build/webrtc/Android.mk | 6 +++++- submodules/linphone | 2 +- submodules/msilbc | 2 +- 15 files changed, 48 insertions(+), 11 deletions(-) diff --git a/jni/Application.mk b/jni/Application.mk index 12959bb53..62337407e 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -139,10 +139,14 @@ linphone-root-dir:=$(APP_PROJECT_PATH) APP_BUILD_SCRIPT:=$(call my-dir)/Android.mk APP_PLATFORM := android-8 -APP_ABI := armeabi-v7a +APP_ABI := armeabi-v7a ifeq ($(BUILD_FOR_ARM), 1) APP_ABI += armeabi endif ifeq ($(BUILD_FOR_X86), 1) APP_ABI += x86 endif + +APP_CFLAGS += -Werror -Wall -Wno-strict-aliasing -Wno-unused-function +# Thanks cpufeature.c imported from the NDK... +APP_CFLAGS += -Wno-unused-variable diff --git a/submodules/belle-sip b/submodules/belle-sip index a97a3b328..eed16af00 160000 --- a/submodules/belle-sip +++ b/submodules/belle-sip @@ -1 +1 @@ -Subproject commit a97a3b328e7acec90107552432d3ac4fa98c4426 +Subproject commit eed16af0014ba89fec25b4351f06f60297600381 diff --git a/submodules/externals/build/antlr3/Android.mk b/submodules/externals/build/antlr3/Android.mk index 73f0e2594..20ff05e06 100644 --- a/submodules/externals/build/antlr3/Android.mk +++ b/submodules/externals/build/antlr3/Android.mk @@ -32,5 +32,8 @@ LOCAL_SRC_FILES := \ antlr3tokenstream.c \ antlr3treeparser.c \ +#turn off warnings since we cannot fix them +LOCAL_CFLAGS += -w + include $(BUILD_STATIC_LIBRARY) diff --git a/submodules/externals/build/ffmpeg/Android.mk b/submodules/externals/build/ffmpeg/Android.mk index 6d7257a03..eeb813715 100755 --- a/submodules/externals/build/ffmpeg/Android.mk +++ b/submodules/externals/build/ffmpeg/Android.mk @@ -5,4 +5,7 @@ LOCAL_MODULE := libffmpeg-linphone LOCAL_MODULE_FILENAME := libffmpeg-linphone-$(TARGET_ARCH) LOCAL_SRC_FILES := $(TARGET_ARCH)/libffmpeg-linphone-$(TARGET_ARCH).so +#turn off warnings since we cannot fix them +LOCAL_CFLAGS += -w + include $(PREBUILT_SHARED_LIBRARY) diff --git a/submodules/externals/build/gsm/Android.mk b/submodules/externals/build/gsm/Android.mk index d4af20aac..c7e655ba5 100644 --- a/submodules/externals/build/gsm/Android.mk +++ b/submodules/externals/build/gsm/Android.mk @@ -30,5 +30,8 @@ LOCAL_SRC_FILES := \ LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/inc +#turn off warnings since we cannot fix them +LOCAL_CFLAGS += -w + include $(BUILD_STATIC_LIBRARY) diff --git a/submodules/externals/build/libmatroska/Android.mk b/submodules/externals/build/libmatroska/Android.mk index 3f54b7e43..f84021249 100644 --- a/submodules/externals/build/libmatroska/Android.mk +++ b/submodules/externals/build/libmatroska/Android.mk @@ -63,5 +63,8 @@ LOCAL_CFLAGS := \ LOCAL_MODULE := libmatroska2 +#turn off warnings since we cannot fix them +LOCAL_CFLAGS += -w + include $(BUILD_STATIC_LIBRARY) diff --git a/submodules/externals/build/libupnp/Android.mk b/submodules/externals/build/libupnp/Android.mk index 2fd7f77d0..c5c8caa72 100644 --- a/submodules/externals/build/libupnp/Android.mk +++ b/submodules/externals/build/libupnp/Android.mk @@ -66,5 +66,8 @@ LOCAL_C_FLAGS += -DPTHREAD_MUTEX_RECURSIVE=PTHREAD_MUTEX_RECURSIVE LOCAL_MODULE:= libupnp +#turn off warnings since we cannot fix them +LOCAL_CFLAGS += -w + include $(BUILD_STATIC_LIBRARY) diff --git a/submodules/externals/build/libxml2/Android.mk b/submodules/externals/build/libxml2/Android.mk index ba827c011..864f93a8c 100644 --- a/submodules/externals/build/libxml2/Android.mk +++ b/submodules/externals/build/libxml2/Android.mk @@ -60,5 +60,8 @@ LOCAL_SRC_FILES := $(common_SRC_FILES) LOCAL_MODULE:= liblpxml2 +#turn off warnings since we cannot fix them +LOCAL_CFLAGS += -w + include $(BUILD_STATIC_LIBRARY) diff --git a/submodules/externals/build/opencore-amr/Android.mk b/submodules/externals/build/opencore-amr/Android.mk index 81f48d4d9..16aadfba5 100644 --- a/submodules/externals/build/opencore-amr/Android.mk +++ b/submodules/externals/build/opencore-amr/Android.mk @@ -277,6 +277,9 @@ LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/oscl endif +#turn off warnings since we cannot fix them +LOCAL_CFLAGS += -w + include $(BUILD_STATIC_LIBRARY) diff --git a/submodules/externals/build/opus/Android.mk b/submodules/externals/build/opus/Android.mk index 6bd994503..7e4718660 100644 --- a/submodules/externals/build/opus/Android.mk +++ b/submodules/externals/build/opus/Android.mk @@ -82,7 +82,7 @@ LOCAL_SRC_FILES += \ silk/float/scale_vector_FLP.c silk/float/schur_FLP.c \ silk/float/sort_FLP.c src/opus.c src/opus_decoder.c \ src/opus_encoder.c src/opus_multistream.c src/repacketizer.c \ - src/analysis.c src/mlp.c src/mlp_data.c + src/analysis.c src/mlp.c src/mlp_data.c LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/include \ @@ -95,4 +95,7 @@ LOCAL_CFLAGS += -include ../build/opus/config.h LOCAL_ARM_MODE := arm +#turn off warnings since we cannot fix them +LOCAL_CFLAGS += -w + include $(BUILD_STATIC_LIBRARY) diff --git a/submodules/externals/build/speex/Android.mk b/submodules/externals/build/speex/Android.mk index 7e3e881fb..fa3c0a649 100644 --- a/submodules/externals/build/speex/Android.mk +++ b/submodules/externals/build/speex/Android.mk @@ -48,7 +48,7 @@ fft_SRC_FILES += libspeex/smallft.c # Un-comment for KISS_FFT fft_SRC_FILES += \ libspeex/kiss_fft.c \ - libspeex/kiss_fftr.c + libspeex/kiss_fftr.c libspeexdsp_SRC_FILES := \ libspeex/preprocess.c \ @@ -66,7 +66,7 @@ LOCAL_SRC_FILES := \ $(libspeex_SRC_FILES) \ $(libspeexdsp_SRC_FILES) -# -DARM4_ASM +# -DARM4_ASM USE_FLOAT=0 @@ -82,19 +82,21 @@ ifeq ($(TARGET_ARCH),arm) # add NEON support LOCAL_SRC_FILES += libspeex/resample_neon.c.neon ifeq ($(USE_FLOAT),1) - LOCAL_CFLAGS += -DFLOATING_POINT=1 - else + LOCAL_CFLAGS += -DFLOATING_POINT=1 + else LOCAL_CFLAGS += $(FIXED_POINT_FLAGS) endif else LOCAL_CFLAGS += $(FIXED_POINT_FLAGS) - endif + endif else LOCAL_CFLAGS += \ -DFLOATING_POINT=1 endif +#turn off warnings since we cannot fix them +LOCAL_CFLAGS += -w LOCAL_CFLAGS += \ -UHAVE_CONFIG_H \ diff --git a/submodules/externals/build/vo-amrwbenc/Android.mk b/submodules/externals/build/vo-amrwbenc/Android.mk index 7de5159d5..1003b8708 100644 --- a/submodules/externals/build/vo-amrwbenc/Android.mk +++ b/submodules/externals/build/vo-amrwbenc/Android.mk @@ -106,6 +106,9 @@ LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/amrwbenc/inc/ \ $(LOCAL_PATH)/common/include/ +#turn off warnings since we cannot fix them +LOCAL_CFLAGS += -w + include $(BUILD_STATIC_LIBRARY) diff --git a/submodules/externals/build/webrtc/Android.mk b/submodules/externals/build/webrtc/Android.mk index 75b856d6c..35f5a4bf9 100644 --- a/submodules/externals/build/webrtc/Android.mk +++ b/submodules/externals/build/webrtc/Android.mk @@ -1,7 +1,7 @@ MY_WEBRTC_COMMON_DEFS := \ -DWEBRTC_ANDROID \ -DWEBRTC_LINUX \ - -DWEBRTC_CLOCK_TYPE_REALTIME + -DWEBRTC_CLOCK_TYPE_REALTIME ifneq (,$(findstring armeabi,$(TARGET_ARCH_ABI))) MY_WEBRTC_COMMON_DEFS += -DWEBRTC_ARCH_ARM @@ -10,3 +10,7 @@ endif ifeq ($(TARGET_ARCH_ABI), armeabi-v7a) MY_WEBRTC_COMMON_DEFS += -DWEBRTC_DETECT_ARM_NEON endif + +#turn off warnings since we cannot fix them +MY_WEBRTC_COMMON_DEFS += -w + diff --git a/submodules/linphone b/submodules/linphone index ea8013138..49e10b2ee 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit ea80131389c23acd5c9e4bbcd57b74cc8355598e +Subproject commit 49e10b2ee34b7338071ac922d5256869ec7b72bd diff --git a/submodules/msilbc b/submodules/msilbc index f9f77d4fe..e027979b5 160000 --- a/submodules/msilbc +++ b/submodules/msilbc @@ -1 +1 @@ -Subproject commit f9f77d4fe04cd51aa3ca4b3b35ac51667c48139e +Subproject commit e027979b567d13b221dfd4312149cd2820a496ff