Author: Brad Smith Date: 2023-12-04T03:01:38-05:00 New Revision: c1e2457a14f865371bb2dcba260ace32e3a2f71b
URL: https://github.com/llvm/llvm-project/commit/c1e2457a14f865371bb2dcba260ace32e3a2f71b DIFF: https://github.com/llvm/llvm-project/commit/c1e2457a14f865371bb2dcba260ace32e3a2f71b.diff LOG: [lldb] Fix build on NetBSD (#74190) lldb/source/Host/netbsd/HostNetBSD.cpp:112:32: error: reinterpret_cast from 'const uint8_t *' (aka 'const unsigned char *') to 'char *' casts away qualifiers {reinterpret_cast<char *>(buffer_sp->GetBytes()), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Added: Modified: lldb/source/Host/netbsd/HostNetBSD.cpp Removed: ################################################################################ diff --git a/lldb/source/Host/netbsd/HostNetBSD.cpp b/lldb/source/Host/netbsd/HostNetBSD.cpp index c47b96a5ceda6..de8b2fd7cb0cc 100644 --- a/lldb/source/Host/netbsd/HostNetBSD.cpp +++ b/lldb/source/Host/netbsd/HostNetBSD.cpp @@ -108,10 +108,11 @@ static bool GetNetBSDProcessCPUType(ProcessInstanceInfo &process_info) { auto buffer_sp = FileSystem::Instance().CreateDataBuffer( process_info.GetExecutableFile(), 0x20, 0); if (buffer_sp) { - uint8_t exe_class = llvm::object::getElfArchType( - {reinterpret_cast<char *>(buffer_sp->GetBytes()), - size_t(buffer_sp->GetByteSize())}) - .first; + uint8_t exe_class = + llvm::object::getElfArchType( + {reinterpret_cast<const char *>(buffer_sp->GetBytes()), + size_t(buffer_sp->GetByteSize())}) + .first; switch (exe_class) { case llvm::ELF::ELFCLASS32: _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits