From 406a85e3379b4ecdd668cb39a386864db2d59e0e Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Mon, 13 Jul 2009 13:02:33 -0700 Subject: [PATCH] Format aapt warnings the same way as other compiler warnings ('warning: ' instead of 'WARNING: ' or 'WARNING ') --- Package.cpp | 6 +++--- Resource.cpp | 4 ++-- ResourceTable.cpp | 14 +++++++------- SourcePos.cpp | 2 +- XMLNode.cpp | 2 +- ZipEntry.cpp | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Package.cpp b/Package.cpp index 8424169..999a5cf 100644 --- a/Package.cpp +++ b/Package.cpp @@ -168,7 +168,7 @@ status_t writeAPK(Bundle* bundle, const sp& 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; } diff --git a/Resource.cpp b/Resource.cpp index 81db323..41ee88b 100644 --- a/Resource.cpp +++ b/Resource.cpp @@ -174,7 +174,7 @@ static sp getResourceFile(const sp& assets, bool makeIfNec static status_t parsePackage(const sp& assets, const sp& 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()); } } diff --git a/ResourceTable.cpp b/ResourceTable.cpp index b004664..8dbc12e 100644 --- a/ResourceTable.cpp +++ b/ResourceTable.cpp @@ -3554,26 +3554,26 @@ sp 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 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 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 ResourceTable::getEntry(uint32_t resID, if (config) cdesc = *config; sp 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; igetBag().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; diff --git a/SourcePos.cpp b/SourcePos.cpp index 2761d18..e2a921c 100644 --- a/SourcePos.cpp +++ b/SourcePos.cpp @@ -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()); diff --git a/XMLNode.cpp b/XMLNode.cpp index 832ba6c..6daa0d2 100644 --- a/XMLNode.cpp +++ b/XMLNode.cpp @@ -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()); diff --git a/ZipEntry.cpp b/ZipEntry.cpp index bed0333..a0b54c2 100644 --- a/ZipEntry.cpp +++ b/ZipEntry.cpp @@ -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? } -- 2.45.2