From a722dea4af7743a76701bb582ded88fe0e188c14 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 5 Apr 2022 13:50:12 -0700 Subject: [PATCH] [lldb] Update reinterpret_cast in linux/Host.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes error: reinterpret_cast from type ‘const uint8_t*’ {aka ‘const unsigned char*’} to type ‘char*’ casts away qualifiers --- lldb/source/Host/linux/Host.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp index 6342dee..2196b8e 100644 --- a/lldb/source/Host/linux/Host.cpp +++ b/lldb/source/Host/linux/Host.cpp @@ -133,10 +133,11 @@ static ArchSpec GetELFProcessCPUType(llvm::StringRef exe_path) { if (!buffer_sp) return ArchSpec(); - uint8_t exe_class = llvm::object::getElfArchType( - {reinterpret_cast(buffer_sp->GetBytes()), - size_t(buffer_sp->GetByteSize())}) - .first; + uint8_t exe_class = + llvm::object::getElfArchType( + {reinterpret_cast(buffer_sp->GetBytes()), + size_t(buffer_sp->GetByteSize())}) + .first; switch (exe_class) { case llvm::ELF::ELFCLASS32: -- 2.7.4