Strict build warning checks
Change-Id: Ia73c605ba3ebf06d247859d15c5a424ef021ee12
diff --git a/src/Android.mk b/src/Android.mk
index 1fb5ddb..4f3f665 100644
--- a/src/Android.mk
+++ b/src/Android.mk
@@ -11,6 +11,7 @@
$(call include-path-for, wilhelm)
LOCAL_CFLAGS += -fvisibility=hidden -UNDEBUG
+LOCAL_CFLAGS += -Wall -Werror
LOCAL_MODULE := libOpenSLESUT
@@ -26,6 +27,7 @@
# optional, see comments in MPH_to.c: -DUSE_DESIGNATED_INITIALIZERS -S
# and also see ../tools/mphgen/Makefile
LOCAL_CFLAGS += -DUSE_DESIGNATED_INITIALIZERS -UNDEBUG
+LOCAL_CFLAGS += -Wall -Werror
LOCAL_SRC_FILES:= \
assert.c \
@@ -217,6 +219,7 @@
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += -x c++ -std=gnu++11 -DLI_API= -fvisibility=hidden -UNDEBUG \
-DSL_API='__attribute__((visibility("default")))'
+LOCAL_CFLAGS += -Wall -Werror
LOCAL_SHARED_LIBRARIES := libwilhelm liblog
include $(BUILD_SHARED_LIBRARY)
@@ -231,5 +234,6 @@
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += -x c++ -std=gnu++11 -DLI_API= -fvisibility=hidden -UNDEBUG \
-DXA_API='__attribute__((visibility("default")))'
+LOCAL_CFLAGS += -Wall -Werror
LOCAL_SHARED_LIBRARIES := libwilhelm liblog
include $(BUILD_SHARED_LIBRARY)
diff --git a/tools/hashgen/Makefile b/tools/hashgen/Makefile
index fdd143c..9e82295 100644
--- a/tools/hashgen/Makefile
+++ b/tools/hashgen/Makefile
@@ -4,6 +4,7 @@
cp IID_to_MPH.c ../../src/autogen
CFLAGS = -I../../include -g -DNDEBUG
+CFLAGS += -Wall -Werror
%.o : %.c
gcc -c -o $@ $(CFLAGS) $<
diff --git a/tools/mphtogen/Makefile b/tools/mphtogen/Makefile
index c6a6fb2..788f412 100644
--- a/tools/mphtogen/Makefile
+++ b/tools/mphtogen/Makefile
@@ -10,7 +10,7 @@
mphtogen : mphtogen.c MPH_to.c MPH.h MPH_to.h
# Add -DANDROID if both (a) building for Android, and (b) not
# using -DUSE_DESIGNATED_INITIALIZERS in ../../src/Android.mk
- gcc -o $@ -DUSE_DESIGNATED_INITIALIZERS mphtogen.c MPH_to.c
+ gcc -o $@ -DUSE_DESIGNATED_INITIALIZERS -Wall -Werror mphtogen.c MPH_to.c
clean :
$(RM) mphtogen
diff --git a/tools/permute/Makefile b/tools/permute/Makefile
index 65ed44d..8a07864 100644
--- a/tools/permute/Makefile
+++ b/tools/permute/Makefile
@@ -1,5 +1,5 @@
permute : permute.c
- gcc -o $@ -Wall permute.c -lsndfile
+ gcc -o $@ -Wall -Werror permute.c -lsndfile
clean :
- $(RM) $@
+ $(RM) permute
diff --git a/tools/permute/permute.c b/tools/permute/permute.c
index 4b6522e..6997552 100644
--- a/tools/permute/permute.c
+++ b/tools/permute/permute.c
@@ -141,6 +141,7 @@
goto out;
}
+#if 0
// Must be 16-bit signed or 8-bit unsigned PCM
unsigned subtype = sfinfo_in.format & SF_FORMAT_SUBMASK;
unsigned sampleSizeIn = 0;
@@ -155,6 +156,7 @@
fprintf(stderr, "%s: unsupported subtype 0x%X\n", path_in, subtype);
goto out;
}
+#endif
// always read shorts
unsigned sampleSizeRead = 2;
@@ -185,12 +187,10 @@
}
// Must be either stereo or mono
- unsigned frameSizeIn = 0;
unsigned frameSizeRead = 0;
switch (sfinfo_in.channels) {
case 1:
case 2:
- frameSizeIn = sampleSizeIn * sfinfo_in.channels;
frameSizeRead = sampleSizeRead * sfinfo_in.channels;
break;
default: