Frameworks/base: Turn on -Wall -Werror in cmds

Fix small warnings, turn on -Wall -Werror.

Change-Id: Iab1f01a7c7ebd6ba832b75067c5e395f380a1b8b
diff --git a/cmds/idmap/scan.cpp b/cmds/idmap/scan.cpp
index 1153f38..4f19a74 100644
--- a/cmds/idmap/scan.cpp
+++ b/cmds/idmap/scan.cpp
@@ -64,30 +64,6 @@
         return String8(tmp);
     }
 
-    int mkdir_p(const String8& path, uid_t uid, gid_t gid)
-    {
-        static const mode_t mode =
-            S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH;
-        struct stat st;
-
-        if (stat(path.string(), &st) == 0) {
-            return 0;
-        }
-        if (mkdir_p(path.getPathDir(), uid, gid) < 0) {
-            return -1;
-        }
-        if (mkdir(path.string(), 0755) != 0) {
-            return -1;
-        }
-        if (chown(path.string(), uid, gid) == -1) {
-            return -1;
-        }
-        if (chmod(path.string(), mode) == -1) {
-            return -1;
-        }
-        return 0;
-    }
-
     int parse_overlay_tag(const ResXMLTree& parser, const char *target_package_name)
     {
         const size_t N = parser.getAttributeCount();
@@ -98,7 +74,7 @@
             String16 key(parser.getAttributeName(i, &len));
             if (key == String16("targetPackage")) {
                 const uint16_t *p = parser.getAttributeStringValue(i, &len);
-                if (p) {
+                if (p != NULL) {
                     target = String16(p, len);
                 }
             } else if (key == String16("priority")) {
@@ -164,7 +140,7 @@
             return -1;
         }
         FileMap *dataMap = zip->createEntryFileMap(entry);
-        if (!dataMap) {
+        if (dataMap == NULL) {
             ALOGW("%s: failed to create FileMap\n", __FUNCTION__);
             return -1;
         }