From 01f185633c1c12017731336e7f926fe398c69781 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 8 Apr 2015 17:29:00 -0700 Subject: Re-enable -Wall and -Werror that were lost in a merge -Wall and -Werror were lost during a merge when they were added to aaptCFLAGS instead of aaptCFlags. Fix the typo, and the warnings that crept in while it was disabled. Change-Id: Ib944b8d6149278e4f3861c1acac277bcd95cc7c2 --- tools/aapt/Android.mk | 2 +- tools/aapt/Images.cpp | 1 - tools/aapt/Resource.cpp | 1 - tools/aapt/ResourceTable.cpp | 3 +-- 4 files changed, 2 insertions(+), 5 deletions(-) (limited to 'tools/aapt') diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk index c5495a5..9956bd7 100644 --- a/tools/aapt/Android.mk +++ b/tools/aapt/Android.mk @@ -67,7 +67,7 @@ aaptHostStaticLibs := \ libziparchive-host aaptCFlags := -DAAPT_VERSION=\"$(BUILD_NUMBER)\" -aaptCFLAGS += -Wall -Werror +aaptCFlags += -Wall -Werror ifeq ($(HOST_OS),linux) aaptHostLdLibs += -lrt -ldl -lpthread diff --git a/tools/aapt/Images.cpp b/tools/aapt/Images.cpp index 063b4e6..e4738f5 100644 --- a/tools/aapt/Images.cpp +++ b/tools/aapt/Images.cpp @@ -412,7 +412,6 @@ static void find_max_opacity(png_byte** rows, int startX, int startY, int endX, int endY, int dX, int dY, int* out_inset) { - bool opaque_within_inset = true; uint8_t max_opacity = 0; int inset = 0; *out_inset = 0; diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index 36299c2..a6b862e 100644 --- a/tools/aapt/Resource.cpp +++ b/tools/aapt/Resource.cpp @@ -3056,7 +3056,6 @@ writeProguardForLayouts(ProguardKeepSet* keep, const sp& assets) const sp& d = dirs.itemAt(k); const String8& dirName = d->getLeaf(); Vector startTags; - const char* startTag = NULL; const KeyedVector >* tagAttrPairs = NULL; if ((dirName == String8("layout")) || (strncmp(dirName.string(), "layout-", 7) == 0)) { tagAttrPairs = &kLayoutTagAttrPairs; diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp index 941a288..585a6de 100644 --- a/tools/aapt/ResourceTable.cpp +++ b/tools/aapt/ResourceTable.cpp @@ -3167,7 +3167,7 @@ status_t ResourceTable::flatten(Bundle* bundle, const sp& if (!validResources[i]) { sp c = t->getOrderedConfigs().itemAt(i); if (c != NULL) { - fprintf(stderr, "%s: no entries written for %s/%s (0x%08x)\n", log_prefix, + fprintf(stderr, "%s: no entries written for %s/%s (0x%08zx)\n", log_prefix, String8(typeName).string(), String8(c->getName()).string(), Res_MAKEID(p->getAssignedId() - 1, ti, i)); } @@ -4526,7 +4526,6 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle) { const KeyedVector& bag = e->getBag(); const size_t bagCount = bag.size(); for (size_t bi = 0; bi < bagCount; bi++) { - const Item& item = bag.valueAt(bi); const uint32_t attrId = getResId(bag.keyAt(bi), &attr16); const int sdkLevel = getPublicAttributeSdkLevel(attrId); if (sdkLevel > 1 && sdkLevel > config.sdkVersion && sdkLevel > minSdk) { -- cgit v1.1