Merge "Remove unused but set variables"
This commit is contained in:
@@ -319,12 +319,10 @@ int AaptLocaleValue::initFromDirName(const Vector<String8>& parts, const int sta
|
|||||||
|
|
||||||
// The second subtag can either be a script or a region code.
|
// The second subtag can either be a script or a region code.
|
||||||
// If its size is 4, it's a script code, else it's a region code.
|
// If its size is 4, it's a script code, else it's a region code.
|
||||||
bool hasRegion = false;
|
|
||||||
if (subtags[1].size() == 4) {
|
if (subtags[1].size() == 4) {
|
||||||
setScript(subtags[1]);
|
setScript(subtags[1]);
|
||||||
} else if (subtags[1].size() == 2 || subtags[1].size() == 3) {
|
} else if (subtags[1].size() == 2 || subtags[1].size() == 3) {
|
||||||
setRegion(subtags[1]);
|
setRegion(subtags[1]);
|
||||||
hasRegion = true;
|
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "ERROR: Invalid BCP 47 tag in directory name %s\n", part.string());
|
fprintf(stderr, "ERROR: Invalid BCP 47 tag in directory name %s\n", part.string());
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -2475,11 +2475,10 @@ void ResourceTable::reportError(void* accessorCookie, const char* fmt, ...)
|
|||||||
{
|
{
|
||||||
if (accessorCookie != NULL && fmt != NULL) {
|
if (accessorCookie != NULL && fmt != NULL) {
|
||||||
AccessorCookie* ac = (AccessorCookie*)accessorCookie;
|
AccessorCookie* ac = (AccessorCookie*)accessorCookie;
|
||||||
int retval=0;
|
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
retval = vsnprintf(buf, sizeof(buf), fmt, ap);
|
vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
ac->sourcePos.error("Error: %s (at '%s' with value '%s').\n",
|
ac->sourcePos.error("Error: %s (at '%s' with value '%s').\n",
|
||||||
buf, ac->attr.string(), ac->value.string());
|
buf, ac->attr.string(), ac->value.string());
|
||||||
|
|||||||
Reference in New Issue
Block a user