diff options
author | Chih-Hung Hsieh <chh@google.com> | 2017-10-03 13:28:32 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2017-10-03 13:38:46 -0700 |
commit | 3ba7298e9569a260aba8d4f767f09ae0b94898a2 (patch) | |
tree | 51b48ebdd058795cbcd88b187657ad3bf6569bb3 | |
parent | 53401d7c35cb7cce27d9f7f81c673f8be78dc56c (diff) | |
download | libhardware_legacy-3ba7298e9569a260aba8d4f767f09ae0b94898a2.tar.gz |
Use -Werror in hardware/libhardware_legacy
* Remove unused local variable or suppress the warning.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I4d7b4f2e9e7e6c60d8bfc209f47e6f1d33720165
-rw-r--r-- | Android.bp | 3 | ||||
-rw-r--r-- | audio/Android.bp | 3 | ||||
-rw-r--r-- | power.c | 1 |
3 files changed, 6 insertions, 1 deletions
@@ -17,6 +17,7 @@ cc_library { name: "libpower", srcs: ["power.c"], + cflags: ["-Wall", "-Werror"], export_include_dirs: ["include"], shared_libs: ["libcutils", "liblog"], vendor_available: true, @@ -48,6 +49,8 @@ cc_library_shared { cflags: [ "-DQEMU_HARDWARE", + "-Wall", + "-Werror", "-Wno-unused-parameter", "-Wno-gnu-designator", ], diff --git a/audio/Android.bp b/audio/Android.bp index 5141dee..a7c51af 100644 --- a/audio/Android.bp +++ b/audio/Android.bp @@ -13,7 +13,10 @@ cc_library_static { name: "libaudiohw_legacy", static_libs: ["libmedia_helper"], cflags: [ + "-Wall", + "-Werror", "-Wno-unused-parameter", + "-Wno-unused-variable", "-Wno-gnu-designator", ], @@ -91,7 +91,6 @@ acquire_wake_lock(int lock, const char* id) if (g_error) return g_error; int fd; - size_t len; ssize_t ret; if (lock != PARTIAL_WAKE_LOCK) { |