diff --git a/tests/A64/unicorn_emu/unicorn.cpp b/tests/A64/unicorn_emu/unicorn.cpp index 93cc4966..41aec0c3 100644 --- a/tests/A64/unicorn_emu/unicorn.cpp +++ b/tests/A64/unicorn_emu/unicorn.cpp @@ -72,7 +72,8 @@ std::array Unicorn::GetRegisters() const { for (size_t i = 0; i < num_gprs; ++i) ptrs[i] = ®s[i]; - CHECKED(uc_reg_read_batch(uc, const_cast(gpr_ids.data()), (void**)ptrs.data(), num_gprs)); + CHECKED(uc_reg_read_batch(uc, const_cast(gpr_ids.data()), + reinterpret_cast(ptrs.data()), num_gprs)); return regs; } @@ -81,7 +82,8 @@ void Unicorn::SetRegisters(const std::array& value) { for (size_t i = 0; i < num_gprs; ++i) ptrs[i] = &value[i]; - CHECKED(uc_reg_write_batch(uc, const_cast(gpr_ids.data()), (void**)ptrs.data(), num_gprs)); + CHECKED(uc_reg_write_batch(uc, const_cast(gpr_ids.data()), + reinterpret_cast(const_cast(ptrs.data())), num_gprs)); } using Vector = Unicorn::Vector; @@ -99,7 +101,8 @@ std::array Unicorn::GetVectors() const { for (size_t i = 0; i < num_vecs; ++i) ptrs[i] = &vecs[i]; - CHECKED(uc_reg_read_batch(uc, const_cast(vec_ids.data()), (void**)ptrs.data(), num_vecs)); + CHECKED(uc_reg_read_batch(uc, const_cast(vec_ids.data()), + reinterpret_cast(ptrs.data()), num_vecs)); return vecs; } @@ -109,7 +112,8 @@ void Unicorn::SetVectors(const std::array& value) { for (size_t i = 0; i < num_vecs; ++i) ptrs[i] = &value[i]; - CHECKED(uc_reg_write_batch(uc, const_cast(vec_ids.data()), (void**)ptrs.data(), num_vecs)); + CHECKED(uc_reg_write_batch(uc, const_cast(vec_ids.data()), + reinterpret_cast(const_cast(ptrs.data())), num_vecs)); } u32 Unicorn::GetFpcr() const {