Snap for 4386413 from f8fc00c6ce9cbab867ca14d419516ec175aa3bd0 to pi-release

Change-Id: I5e074b6b03cdd9701a1aae2685a697a9e6d15642
diff --git a/Android.bp b/Android.bp
index 152b85c..e6e1c66 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,6 +12,17 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+cc_defaults {
+    name: "libcap_defaults",
+    cflags: [
+        "-Wall",
+        "-Werror",
+        "-Wno-unused-parameter",
+        "-Wno-unused-result",
+        "-Wno-tautological-compare",
+    ],
+}
+
 cc_library {
     name: "libcap",
     host_supported: true,
@@ -19,11 +30,7 @@
     vndk: {
         enabled: true,
     },
-
-    cflags: [
-        "-Wno-unused-parameter",
-        "-Wno-tautological-compare",
-    ],
+    defaults: ["libcap_defaults"],
 
     srcs: [
         "libcap/cap_alloc.c",
@@ -52,10 +59,7 @@
 
     srcs: ["progs/getcap.c"],
 
-    cflags: [
-        "-Wno-unused-parameter",
-        "-Wno-tautological-compare",
-    ],
+    defaults: ["libcap_defaults"],
 
     static_libs: [
         "libcap",
@@ -67,10 +71,7 @@
 
     srcs: ["progs/setcap.c"],
 
-    cflags: [
-        "-Wno-unused-parameter",
-        "-Wno-tautological-compare",
-    ],
+    defaults: ["libcap_defaults"],
 
     static_libs: [
         "libcap",