Use -Werror in frameworks/av/media/libaaudio
* Remove unused local variables, labels, functions, private fields.
* Fix warning of unused return result.
* Use template functions in .h file to avoid warning of unused static functions.
Bug: 66996870
Test: build with WITH_TIDY=1
Exempt-From-Owner-Approval: cherry picked from goog
Merged-In: I54962a7fd36a405e54366130b9c0a24e26fe8ebb
Change-Id: I54962a7fd36a405e54366130b9c0a24e26fe8ebb
(cherry picked from commit 68326fe017a18957419a81489b67f75831f9a674)
diff --git a/media/libaaudio/tests/Android.bp b/media/libaaudio/tests/Android.bp
index 1c41cc6..05135df 100644
--- a/media/libaaudio/tests/Android.bp
+++ b/media/libaaudio/tests/Android.bp
@@ -1,11 +1,21 @@
+cc_defaults {
+ name: "libaaudio_tests_defaults",
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
+
cc_test {
name: "test_handle_tracker",
+ defaults: ["libaaudio_tests_defaults"],
srcs: ["test_handle_tracker.cpp"],
shared_libs: ["libaaudio"],
}
cc_test {
name: "test_aaudio_marshalling",
+ defaults: ["libaaudio_tests_defaults"],
srcs: ["test_marshalling.cpp"],
shared_libs: [
"libaaudio",
@@ -17,18 +27,21 @@
cc_test {
name: "test_block_adapter",
+ defaults: ["libaaudio_tests_defaults"],
srcs: ["test_block_adapter.cpp"],
shared_libs: ["libaaudio"],
}
cc_test {
name: "test_linear_ramp",
+ defaults: ["libaaudio_tests_defaults"],
srcs: ["test_linear_ramp.cpp"],
shared_libs: ["libaaudio"],
}
cc_test {
name: "test_open_params",
+ defaults: ["libaaudio_tests_defaults"],
srcs: ["test_open_params.cpp"],
shared_libs: [
"libaaudio",
@@ -40,6 +53,7 @@
cc_test {
name: "test_no_close",
+ defaults: ["libaaudio_tests_defaults"],
srcs: ["test_no_close.cpp"],
shared_libs: [
"libaaudio",
@@ -51,6 +65,7 @@
cc_test {
name: "test_aaudio_recovery",
+ defaults: ["libaaudio_tests_defaults"],
srcs: ["test_recovery.cpp"],
shared_libs: [
"libaaudio",
@@ -62,6 +77,7 @@
cc_test {
name: "test_n_streams",
+ defaults: ["libaaudio_tests_defaults"],
srcs: ["test_n_streams.cpp"],
shared_libs: [
"libaaudio",