Merge "Use -Werror in hardware/libhardware_legacy" am: 8087f07a2b am: a35e4c72b1
am: 6817e3fa13

Change-Id: I1dc39bea1a185e6e5c25205c0282bcc4e0da5429
diff --git a/Android.bp b/Android.bp
index ebb2b4d..066afcf 100644
--- a/Android.bp
+++ b/Android.bp
@@ -17,6 +17,7 @@
     name: "libpower",
 
     srcs: ["power.c"],
+    cflags: ["-Wall", "-Werror"],
     export_include_dirs: ["include"],
     shared_libs: ["libcutils", "liblog"],
     vendor_available: true,
@@ -48,6 +49,8 @@
 
     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 @@
     name: "libaudiohw_legacy",
     static_libs: ["libmedia_helper"],
     cflags: [
+        "-Wall",
+        "-Werror",
         "-Wno-unused-parameter",
+        "-Wno-unused-variable",
         "-Wno-gnu-designator",
     ],
 
diff --git a/power.c b/power.c
index 9250d08..10ba380 100644
--- a/power.c
+++ b/power.c
@@ -91,7 +91,6 @@
     if (g_error) return g_error;
 
     int fd;
-    size_t len;
     ssize_t ret;
 
     if (lock != PARTIAL_WAKE_LOCK) {