diff options
Diffstat (limited to 'runtime/class_loader_context.cc')
-rw-r--r-- | runtime/class_loader_context.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/class_loader_context.cc b/runtime/class_loader_context.cc index 832f1d74ff..4da0091884 100644 --- a/runtime/class_loader_context.cc +++ b/runtime/class_loader_context.cc @@ -19,6 +19,7 @@ #include <android-base/parseint.h> #include "art_field-inl.h" +#include "base/casts.h" #include "base/dchecked_vector.h" #include "base/stl_util.h" #include "class_linker.h" @@ -474,8 +475,8 @@ static bool CollectDexFilesFromJavaDexFile(ObjPtr<mirror::Object> java_dex_file, int32_t long_array_size = long_array->GetLength(); // Index 0 from the long array stores the oat file. The dex files start at index 1. for (int32_t j = 1; j < long_array_size; ++j) { - const DexFile* cp_dex_file = reinterpret_cast<const DexFile*>(static_cast<uintptr_t>( - long_array->GetWithoutChecks(j))); + const DexFile* cp_dex_file = + reinterpret_cast64<const DexFile*>(long_array->GetWithoutChecks(j)); if (cp_dex_file != nullptr && cp_dex_file->NumClassDefs() > 0) { // TODO(calin): It's unclear why the dex files with no classes are skipped here and when // cp_dex_file can be null. |