diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-10-18 19:34:38 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-10-18 19:34:38 +0000 |
commit | ba507b04e178f6a3b25003231ac2038a90d1d98c (patch) | |
tree | 890696e86092fe18fffec4c23fd7e925d51fa4f8 /lldb/source/Plugins | |
parent | 8b8d2a4d999a392ebb90a5e6e739549314a3b52b (diff) | |
download | bcm5719-llvm-ba507b04e178f6a3b25003231ac2038a90d1d98c.tar.gz bcm5719-llvm-ba507b04e178f6a3b25003231ac2038a90d1d98c.zip |
Silence -Wqual-cast warnings from GCC 5.2
There were a number of const qualifiers being cast away which caused warnings.
This cluttered the output hiding real errors. Silence them by explicit casting.
NFC.
llvm-svn: 250662
Diffstat (limited to 'lldb/source/Plugins')
3 files changed, 9 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp index b4f841a16de..cb285c27821 100644 --- a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp +++ b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp @@ -673,9 +673,12 @@ PlatformPOSIX::ConnectRemote (Args& args) if (m_options.get()) { OptionGroupOptions* options = m_options.get(); - const OptionGroupPlatformRSync* m_rsync_options = (OptionGroupPlatformRSync*)options->GetGroupWithOption('r'); - const OptionGroupPlatformSSH* m_ssh_options = (OptionGroupPlatformSSH*)options->GetGroupWithOption('s'); - const OptionGroupPlatformCaching* m_cache_options = (OptionGroupPlatformCaching*)options->GetGroupWithOption('c'); + const OptionGroupPlatformRSync *m_rsync_options = + static_cast<const OptionGroupPlatformRSync *>(options->GetGroupWithOption('r')); + const OptionGroupPlatformSSH *m_ssh_options = + static_cast<const OptionGroupPlatformSSH *>(options->GetGroupWithOption('s')); + const OptionGroupPlatformCaching *m_cache_options = + static_cast<const OptionGroupPlatformCaching *>(options->GetGroupWithOption('c')); if (m_rsync_options->m_rsync) { diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp index f95c683cbc6..99f01e19032 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp @@ -183,7 +183,8 @@ GDBRemoteRegisterContext::ReadRegisterBytes (const RegisterInfo *reg_info, DataE if (!gdb_comm.ReadAllRegisters(m_thread.GetProtocolID(), response)) return false; if (response.IsNormalResponse()) - if (response.GetHexBytes ((void *)m_reg_data.GetDataStart(), m_reg_data.GetByteSize(), '\xcc') == m_reg_data.GetByteSize()) + if (response.GetHexBytes(const_cast<void *>(reinterpret_cast<const void *>(m_reg_data.GetDataStart())), + m_reg_data.GetByteSize(), '\xcc') == m_reg_data.GetByteSize()) SetAllRegisterValid (true); } else if (reg_info->value_regs) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp index 1b7b5d557bc..b9d825489ae 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp @@ -227,7 +227,7 @@ DWARFDebugInfoEntry::Extract bool isCompileUnitTag = m_tag == DW_TAG_compile_unit; if (cu && isCompileUnitTag) - ((DWARFCompileUnit*)cu)->SetBaseAddress(0); + const_cast<DWARFCompileUnit *>(cu)->SetBaseAddress(0); // Skip all data in the .debug_info for the attributes const uint32_t numAttributes = abbrevDecl->NumAttributes(); |