https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/74190
>From 33e60078b75b9e4e7b433219e9e158bdfd1ef046 Mon Sep 17 00:00:00 2001 From: Brad Smith <b...@comstyle.com> Date: Sat, 2 Dec 2023 03:52:38 -0500 Subject: [PATCH] [lldb] Fix build on NetBSD 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. --- lldb/source/Host/netbsd/HostNetBSD.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lldb/source/Host/netbsd/HostNetBSD.cpp b/lldb/source/Host/netbsd/HostNetBSD.cpp index c47b96a5ceda614..de8b2fd7cb0cc52 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