Fix -Wunused-variable compiler warning
frameworks/base/tools/aapt2/link/ManifestFixer.cpp:341:23: error: unused variable 'attr' [-Werror,-Wunused-variable]
341 | if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "glEsVersion")) {
| ^~~~
Test: presubmit
Change-Id: Icec4737a5f8076173a2aff54532a79fa123df326
diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp
index c4f6e70..0b16e2c 100644
--- a/tools/aapt2/link/ManifestFixer.cpp
+++ b/tools/aapt2/link/ManifestFixer.cpp
@@ -338,7 +338,7 @@
}
bool has_gl_es_version = false;
- if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "glEsVersion")) {
+ if (el->FindAttribute(xml::kSchemaAndroid, "glEsVersion")) {
if (has_name) {
diag->Error(android::DiagMessage(el->line_number)
<< "cannot define both android:name and android:glEsVersion in <uses-feature>");