logd: enable -Wextra

Also drop -Wall and -Werror since they're included by default now.

Test: build
Change-Id: Ib0f33d2f02e00aaf544cb0ce5acec5d8acaa8a81
diff --git a/logd/Android.bp b/logd/Android.bp
index b6d30cd..ea1054d 100644
--- a/logd/Android.bp
+++ b/logd/Android.bp
@@ -52,7 +52,9 @@
 
     export_include_dirs: ["."],
 
-    cflags: ["-Werror"] + event_flag,
+    cflags: [
+        "-Wextra",
+    ] + event_flag,
 }
 
 cc_binary {
@@ -75,7 +77,9 @@
         "libcap",
     ],
 
-    cflags: ["-Werror"],
+    cflags: [
+        "-Wextra",
+    ],
 }
 
 cc_binary {
@@ -90,10 +94,8 @@
     shared_libs: ["libbase"],
 
     cflags: [
-        "-Wall",
+        "-Wconversion",
         "-Wextra",
-        "-Werror",
-        "-Wconversion"
     ],
 }
 
diff --git a/logd/LogTags.cpp b/logd/LogTags.cpp
index 17c9a97..082e4a1 100644
--- a/logd/LogTags.cpp
+++ b/logd/LogTags.cpp
@@ -99,8 +99,7 @@
             struct tm tm;
             localtime_r(&now, &tm);
             char timebuf[20];
-            size_t len =
-                strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", &tm);
+            strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", &tm);
             android::base::WriteStringToFd(
                 android::base::StringPrintf(
                     "# Rebuilt %.20s, content owned by logd\n", timebuf),
@@ -189,7 +188,6 @@
 // Read the event log tags file, and build up our internal database
 void LogTags::ReadFileEventLogTags(const char* filename, bool warn) {
     bool etc = !strcmp(filename, system_event_log_tags);
-    bool debug = !etc && !strcmp(filename, debug_event_log_tags);
 
     if (!etc) {
         RebuildFileEventLogTags(filename, warn);
diff --git a/logd/main.cpp b/logd/main.cpp
index 84b97ca..d9dd249 100644
--- a/logd/main.cpp
+++ b/logd/main.cpp
@@ -109,21 +109,6 @@
     return 0;
 }
 
-// Property helper
-static bool check_flag(const char* prop, const char* flag) {
-    const char* cp = strcasestr(prop, flag);
-    if (!cp) {
-        return false;
-    }
-    // We only will document comma (,)
-    static const char sep[] = ",:;|+ \t\f";
-    if ((cp != prop) && !strchr(sep, cp[-1])) {
-        return false;
-    }
-    cp += strlen(flag);
-    return !*cp || !!strchr(sep, *cp);
-}
-
 static int fdDmesg = -1;
 void android::prdebug(const char* fmt, ...) {
     if (fdDmesg < 0) {