This revision was automatically updated to reflect the committed changes. aganea marked an inline comment as done. Closed by commit rL361295: Fix LLDB warnings when compiling with Clang 8.0 (authored by aganea, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D62021?vs=199867&id=200569#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62021/new/ https://reviews.llvm.org/D62021 Files: lldb/trunk/source/Host/common/GetOptInc.cpp lldb/trunk/source/Host/common/MainLoop.cpp lldb/trunk/source/Host/common/Socket.cpp lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp lldb/trunk/source/Host/windows/Windows.cpp lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp lldb/trunk/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
Index: lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp +++ lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp @@ -66,92 +66,128 @@ {dwarf_rax_x86_64, dwarf_rax_x86_64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, lldb_rax_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(rbx, nullptr), {dwarf_rbx_x86_64, dwarf_rbx_x86_64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, lldb_rbx_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(rcx, nullptr), {dwarf_rcx_x86_64, dwarf_rcx_x86_64, LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM, lldb_rcx_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(rdx, nullptr), {dwarf_rdx_x86_64, dwarf_rdx_x86_64, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM, lldb_rdx_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(rdi, nullptr), {dwarf_rdi_x86_64, dwarf_rdi_x86_64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, lldb_rdi_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(rsi, nullptr), {dwarf_rsi_x86_64, dwarf_rsi_x86_64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, lldb_rsi_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(rbp, "fp"), {dwarf_rbp_x86_64, dwarf_rbp_x86_64, LLDB_REGNUM_GENERIC_FP, LLDB_INVALID_REGNUM, lldb_rbp_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(rsp, "sp"), {dwarf_rsp_x86_64, dwarf_rsp_x86_64, LLDB_REGNUM_GENERIC_SP, LLDB_INVALID_REGNUM, lldb_rsp_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(r8, nullptr), {dwarf_r8_x86_64, dwarf_r8_x86_64, LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM, lldb_r8_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(r9, nullptr), {dwarf_r9_x86_64, dwarf_r9_x86_64, LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM, lldb_r9_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(r10, nullptr), {dwarf_r10_x86_64, dwarf_r10_x86_64, LLDB_REGNUM_GENERIC_ARG5, LLDB_INVALID_REGNUM, lldb_r10_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(r11, nullptr), {dwarf_r11_x86_64, dwarf_r11_x86_64, LLDB_REGNUM_GENERIC_ARG6, LLDB_INVALID_REGNUM, lldb_r11_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(r12, nullptr), {dwarf_r12_x86_64, dwarf_r12_x86_64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, lldb_r12_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(r13, nullptr), {dwarf_r13_x86_64, dwarf_r13_x86_64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, lldb_r13_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(r14, nullptr), {dwarf_r14_x86_64, dwarf_r14_x86_64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, lldb_r14_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(r15, nullptr), {dwarf_r15_x86_64, dwarf_r15_x86_64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, lldb_r15_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR(rip, "pc"), {dwarf_rip_x86_64, dwarf_rip_x86_64, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM, lldb_rip_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, {DEFINE_GPR_BIN(eflags, "flags"), {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_REGNUM_GENERIC_FLAGS, LLDB_INVALID_REGNUM, lldb_rflags_x86_64}, nullptr, - nullptr}, + nullptr, + nullptr, + 0}, }; static size_t k_num_register_infos = llvm::array_lengthof(g_register_infos); Index: lldb/trunk/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp +++ lldb/trunk/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp @@ -83,6 +83,7 @@ #else LLDB_LOG(log, "LLDB is 32-bit, but the target process is 64-bit."); #endif + LLVM_FALLTHROUGH; default: break; } Index: lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp +++ lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp @@ -631,6 +631,7 @@ "Creating stop info with the exception."); // FALLTHROUGH: We'll treat this as a generic exception record in the // default case. + LLVM_FALLTHROUGH; } } Index: lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp =================================================================== --- lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp +++ lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp @@ -30,8 +30,9 @@ for (const auto &KV : env) { std::wstring warg; if (llvm::ConvertUTF8toWide(Environment::compose(KV), warg)) { - buffer.insert(buffer.end(), (char *)warg.c_str(), - (char *)(warg.c_str() + warg.size() + 1)); + buffer.insert( + buffer.end(), reinterpret_cast<const char *>(warg.c_str()), + reinterpret_cast<const char *>(warg.c_str() + warg.size() + 1)); } } // One null wchar_t (to end the block) is two null bytes Index: lldb/trunk/source/Host/windows/Windows.cpp =================================================================== --- lldb/trunk/source/Host/windows/Windows.cpp +++ lldb/trunk/source/Host/windows/Windows.cpp @@ -84,7 +84,7 @@ } while (strncasecmp(s, find, len) != 0); s--; } - return ((char *)s); + return const_cast<char *>(s); } char *realpath(const char *name, char *resolved) { Index: lldb/trunk/source/Host/common/GetOptInc.cpp =================================================================== --- lldb/trunk/source/Host/common/GetOptInc.cpp +++ lldb/trunk/source/Host/common/GetOptInc.cpp @@ -97,9 +97,9 @@ pos += nopts; swap = nargv[pos]; /* LINTED const cast */ - ((char **)nargv)[pos] = nargv[cstart]; + const_cast<char **>(nargv)[pos] = nargv[cstart]; /* LINTED const cast */ - ((char **)nargv)[cstart] = swap; + const_cast<char **>(nargv)[cstart] = swap; } } } Index: lldb/trunk/source/Host/common/Socket.cpp =================================================================== --- lldb/trunk/source/Host/common/Socket.cpp +++ lldb/trunk/source/Host/common/Socket.cpp @@ -394,8 +394,8 @@ Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) - log->Printf("%p Socket::Close (fd = %i)", static_cast<void *>(this), - m_socket); + log->Printf("%p Socket::Close (fd = %" PRIu64 ")", + static_cast<void *>(this), static_cast<uint64_t>(m_socket)); #if defined(_WIN32) bool success = !!closesocket(m_socket); Index: lldb/trunk/source/Host/common/MainLoop.cpp =================================================================== --- lldb/trunk/source/Host/common/MainLoop.cpp +++ lldb/trunk/source/Host/common/MainLoop.cpp @@ -61,10 +61,12 @@ static sig_atomic_t g_signal_flags[NSIG]; +#ifndef SIGNAL_POLLING_UNSUPPORTED static void SignalHandler(int signo, siginfo_t *info, void *) { assert(signo < NSIG); g_signal_flags[signo] = 1; } +#endif class MainLoop::RunImpl { public:
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits