diff --git a/opt/optimize_resources/OptimizeResources.cpp b/opt/optimize_resources/OptimizeResources.cpp index 18680cfa24..62a6fbf9e7 100644 --- a/opt/optimize_resources/OptimizeResources.cpp +++ b/opt/optimize_resources/OptimizeResources.cpp @@ -403,7 +403,6 @@ void remap_resource_class_clinit( std::vector filtered_op_data_entries; uint16_t header_entry = *(op_data->data()); - int deleted_array_element_count = 0; auto array_ints = get_fill_array_data_payload(op_data); for (uint32_t entry_x : array_ints) { if (entry_x > PACKAGE_RESID_START) { @@ -420,8 +419,6 @@ void remap_resource_class_clinit( if (c_name.find("R$styleable") != std::string::npos) { filtered_op_data_entries.push_back(0); filtered_op_data_entries.push_back(0); - } else { - ++deleted_array_element_count; } } } else { @@ -618,7 +615,7 @@ void OptimizeResourcesPass::run_pass(DexStoresVector& stores, PassManager& mgr) { std::string zip_dir; conf.get_json_config().get("apk_dir", "", zip_dir); - always_assert(zip_dir.size()); + always_assert(!zip_dir.empty()); // 1. Get all known resource ID's from either resources.pb(AAB) or // resources.arsc(APK) file. diff --git a/test/integ/TypeAnalysisRemoveRedundantCmp.cpp b/test/integ/TypeAnalysisRemoveRedundantCmp.cpp index 5d8d0d2851..6048b356ca 100644 --- a/test/integ/TypeAnalysisRemoveRedundantCmp.cpp +++ b/test/integ/TypeAnalysisRemoveRedundantCmp.cpp @@ -48,16 +48,12 @@ TEST_F(TypeAnalysisTransformTest, MethodHasNoEqDefined) { DexMethod::get_method( "LTypeAnalysisRemoveRedundantCmp;.getYy:()Ljava/lang/String;") ->as_def(); - bool found_cmpz = false; auto codey = y_method->get_code(); ASSERT_NE(nullptr, codey); auto jj = InstructionIterable(y_method->get_code()); auto end2 = jj.end(); for (auto it = jj.begin(); it != end2; ++it) { auto insn = it->insn; - if (insn->opcode() == OPCODE_IF_EQZ || insn->opcode() == OPCODE_IF_NEZ) { - found_cmpz = true; - } } } diff --git a/tools/redex-tool/Verifier.cpp b/tools/redex-tool/Verifier.cpp index 96a0f34933..e35fd34a69 100644 --- a/tools/redex-tool/Verifier.cpp +++ b/tools/redex-tool/Verifier.cpp @@ -127,10 +127,6 @@ void verify(DexStoresVector& stores) { } build_refs(scope, class_refs); } - int references = 0; - for (const auto& refs : class_refs) { - references += (int)refs.second.size(); - } // Build allowed stor (references) map allowed_store_map_t allowed_store_map;