Use -Werror in system/core

* Move -Wall -Werror from cppflags to cflags.
* Fix/suppress warning on unused variables.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I1e05e96a1d0bcb2ccef1ce456504b3af57167cc5
diff --git a/libasyncio/Android.bp b/libasyncio/Android.bp
index 9a637ac..9a12f0d 100644
--- a/libasyncio/Android.bp
+++ b/libasyncio/Android.bp
@@ -14,20 +14,19 @@
 // limitations under the License.
 //
 
-libasyncio_cppflags = [
-    "-Wall",
-    "-Wextra",
-    "-Werror",
-]
+cc_defaults {
+    name: "libasyncio_defaults",
+    cflags: ["-Wall", "-Werror", "-Wextra"],
+}
 
 cc_library {
     name: "libasyncio",
+    defaults: ["libasyncio_defaults"],
     vendor_available: true,
     host_supported: true,
     srcs: [
         "AsyncIO.cpp",
     ],
-    cppflags: libasyncio_cppflags,
 
     export_include_dirs: ["include"],
     target: {