]> git.saurik.com Git - android/aapt.git/commitdiff
Format aapt warnings the same way as other compiler warnings
authorMarco Nelissen <marcone@google.com>
Mon, 13 Jul 2009 20:02:33 +0000 (13:02 -0700)
committerMarco Nelissen <marcone@google.com>
Mon, 13 Jul 2009 21:14:01 +0000 (14:14 -0700)
('warning: ' instead of 'WARNING: ' or 'WARNING ')

Package.cpp
Resource.cpp
ResourceTable.cpp
SourcePos.cpp
XMLNode.cpp
ZipEntry.cpp

index 84241699db3f54ae29a11f7bb222ebc0a2606995..999a5cf82222a4ac6621c0920ea8b10155a28e00 100644 (file)
@@ -168,7 +168,7 @@ status_t writeAPK(Bundle* bundle, const sp<AaptAssets>& assets,
         delete zip;        // close the file so we can remove it in Win32
         zip = NULL;
         if (unlink(outputFile.string()) != 0) {
-            fprintf(stderr, "WARNING: could not unlink '%s'\n", outputFile.string());
+            fprintf(stderr, "warning: could not unlink '%s'\n", outputFile.string());
         }
     }
 
@@ -181,7 +181,7 @@ bail:
             printf("Removing %s due to earlier failures\n", outputFile.string());
         }
         if (unlink(outputFile.string()) != 0) {
-            fprintf(stderr, "WARNING: could not unlink '%s'\n", outputFile.string());
+            fprintf(stderr, "warning: could not unlink '%s'\n", outputFile.string());
         }
     }
 
@@ -283,7 +283,7 @@ bool processFile(Bundle* bundle, ZipFile* zip,
     if (fileNameLen > excludeExtensionLen
             && (0 == strcmp(storageName.string() + (fileNameLen - excludeExtensionLen),
                             kExcludeExtension))) {
-        fprintf(stderr, "WARNING: '%s' not added to Zip\n", storageName.string());
+        fprintf(stderr, "warning: '%s' not added to Zip\n", storageName.string());
         return true;
     }
 
index 81db3233ea4d3d3301679dd8327df9ea663d546e..41ee88b4451c1bc90162a62f4b5883262c32cd25 100644 (file)
@@ -174,7 +174,7 @@ static sp<AaptFile> getResourceFile(const sp<AaptAssets>& assets, bool makeIfNec
 static status_t parsePackage(const sp<AaptAssets>& assets, const sp<AaptGroup>& grp)
 {
     if (grp->getFiles().size() != 1) {
-        fprintf(stderr, "WARNING: Multiple AndroidManifest.xml files found, using %s\n",
+        fprintf(stderr, "warning: Multiple AndroidManifest.xml files found, using %s\n",
                 grp->getFiles().valueAt(0)->getPrintableSource().string());
     }
 
@@ -419,7 +419,7 @@ static void checkForIds(const String8& path, ResXMLParser& parser)
         if (code == ResXMLTree::START_TAG) {
             ssize_t index = parser.indexOfAttribute(NULL, "id");
             if (index >= 0) {
-                fprintf(stderr, "%s:%d: WARNING: found plain 'id' attribute; did you mean the new 'android:id' name?\n",
+                fprintf(stderr, "%s:%d: warning: found plain 'id' attribute; did you mean the new 'android:id' name?\n",
                         path.string(), parser.getLineNumber());
             }
         }
index b004664af5ce740d3d973ddbdecbb904bf7e2805..8dbc12ec6069a45d3a3b0f3ccc6a2683cd73ec3b 100644 (file)
@@ -3554,26 +3554,26 @@ sp<const ResourceTable::Entry> ResourceTable::getEntry(uint32_t resID,
 
     }
     if (p == NULL) {
-        fprintf(stderr, "WARNING: Package not found for resource #%08x\n", resID);
+        fprintf(stderr, "warning: Package not found for resource #%08x\n", resID);
         return NULL;
     }
 
     int tid = Res_GETTYPE(resID);
     if (tid < 0 || tid >= (int)p->getOrderedTypes().size()) {
-        fprintf(stderr, "WARNING: Type not found for resource #%08x\n", resID);
+        fprintf(stderr, "warning: Type not found for resource #%08x\n", resID);
         return NULL;
     }
     sp<Type> t = p->getOrderedTypes()[tid];
 
     int eid = Res_GETENTRY(resID);
     if (eid < 0 || eid >= (int)t->getOrderedConfigs().size()) {
-        fprintf(stderr, "WARNING: Entry not found for resource #%08x\n", resID);
+        fprintf(stderr, "warning: Entry not found for resource #%08x\n", resID);
         return NULL;
     }
 
     sp<ConfigList> c = t->getOrderedConfigs()[eid];
     if (c == NULL) {
-        fprintf(stderr, "WARNING: Entry not found for resource #%08x\n", resID);
+        fprintf(stderr, "warning: Entry not found for resource #%08x\n", resID);
         return NULL;
     }
     
@@ -3581,7 +3581,7 @@ sp<const ResourceTable::Entry> ResourceTable::getEntry(uint32_t resID,
     if (config) cdesc = *config;
     sp<Entry> e = c->getEntries().valueFor(cdesc);
     if (c == NULL) {
-        fprintf(stderr, "WARNING: Entry configuration not found for resource #%08x\n", resID);
+        fprintf(stderr, "warning: Entry configuration not found for resource #%08x\n", resID);
         return NULL;
     }
     
@@ -3599,7 +3599,7 @@ const ResourceTable::Item* ResourceTable::getItem(uint32_t resID, uint32_t attrI
     for (size_t i=0; i<N; i++) {
         const Item& it = e->getBag().valueAt(i);
         if (it.bagKeyId == 0) {
-            fprintf(stderr, "WARNING: ID not yet assigned to '%s' in bag '%s'\n",
+            fprintf(stderr, "warning: ID not yet assigned to '%s' in bag '%s'\n",
                     String8(e->getName()).string(),
                     String8(e->getBag().keyAt(i)).string());
         }
@@ -3627,7 +3627,7 @@ bool ResourceTable::getItemValue(
                     break;
                 }
             }
-            fprintf(stderr, "WARNING: Circular reference detected in key '%s' of bag '%s'\n",
+            fprintf(stderr, "warning: Circular reference detected in key '%s' of bag '%s'\n",
                     String8(e->getName()).string(),
                     String8(e->getBag().keyAt(i)).string());
             return false;
index 2761d182dec69eb1d3a4af5a68e755e8ff1adb46..e2a921c060c559c64f9b2c329ed88c9a148ec352 100644 (file)
@@ -86,7 +86,7 @@ ErrorPos::operator=(const ErrorPos& rhs)
 void
 ErrorPos::print(FILE* to) const
 {
-    const char* type = fatal ? "ERROR" : "WARNING";
+    const char* type = fatal ? "error:" : "warning:";
     
     if (this->line >= 0) {
         fprintf(to, "%s:%d: %s %s\n", this->file.string(), this->line, type, this->error.string());
index 832ba6ca6c5f767e00b92608b0526a229492d301..6daa0d206da62065111102bf20c68b21d4fb6b17 100644 (file)
@@ -220,7 +220,7 @@ moveon:
             spanStack.pop();
 
             if (empty) {
-                fprintf(stderr, "%s:%d: WARNING: empty '%s' span found in text '%s'\n",
+                fprintf(stderr, "%s:%d: warning: empty '%s' span found in text '%s'\n",
                         fileName, inXml->getLineNumber(),
                         String8(spanTag).string(), String8(*outString).string());
 
index bed033361c58644fd46931cf50f2cd10bdd2f3ca..a0b54c2cf78d992d2e5e17155d6d837ea57c3602 100644 (file)
@@ -90,7 +90,7 @@ status_t ZipEntry::initFromCDE(FILE* fp)
      * prefer the CDE values.)
      */
     if (!hasDD && !compareHeaders()) {
-        LOGW("WARNING: header mismatch\n");
+        LOGW("warning: header mismatch\n");
         // keep going?
     }