[Lldb-commits] [lldb] r356362 - Fix "type qualifiers ignored on cast result type" warnings
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 18 03:50:46 PDT 2019
Author: labath
Date: Mon Mar 18 03:50:46 2019
New Revision: 356362
URL: http://llvm.org/viewvc/llvm-project?rev=356362&view=rev
Log:
Fix "type qualifiers ignored on cast result type" warnings
These warnings start to get emitted with gcc-8.
Modified:
lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.cpp
lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.cpp
Modified: lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.cpp?rev=356362&r1=356361&r2=356362&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.cpp Mon Mar 18 03:50:46 2019
@@ -162,7 +162,7 @@ UUID MinidumpParser::GetModuleUUID(const
return UUID();
const CvSignature cv_signature =
- static_cast<CvSignature>(static_cast<const uint32_t>(*signature));
+ static_cast<CvSignature>(static_cast<uint32_t>(*signature));
if (cv_signature == CvSignature::Pdb70) {
// PDB70 record
@@ -263,9 +263,8 @@ ArchSpec MinidumpParser::GetArchitecture
llvm::Triple triple;
triple.setVendor(llvm::Triple::VendorType::UnknownVendor);
- const MinidumpCPUArchitecture arch =
- static_cast<const MinidumpCPUArchitecture>(
- static_cast<const uint32_t>(system_info->processor_arch));
+ const MinidumpCPUArchitecture arch = static_cast<MinidumpCPUArchitecture>(
+ static_cast<uint32_t>(system_info->processor_arch));
switch (arch) {
case MinidumpCPUArchitecture::X86:
@@ -285,8 +284,8 @@ ArchSpec MinidumpParser::GetArchitecture
break;
}
- const MinidumpOSPlatform os = static_cast<const MinidumpOSPlatform>(
- static_cast<const uint32_t>(system_info->platform_id));
+ const MinidumpOSPlatform os = static_cast<MinidumpOSPlatform>(
+ static_cast<uint32_t>(system_info->platform_id));
// TODO add all of the OSes that Minidump/breakpad distinguishes?
switch (os) {
Modified: lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.cpp?rev=356362&r1=356361&r2=356362&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.cpp Mon Mar 18 03:50:46 2019
@@ -19,11 +19,10 @@ const MinidumpHeader *MinidumpHeader::Pa
Status error = consumeObject(data, header);
const MinidumpHeaderConstants signature =
- static_cast<const MinidumpHeaderConstants>(
- static_cast<const uint32_t>(header->signature));
- const MinidumpHeaderConstants version =
- static_cast<const MinidumpHeaderConstants>(
- static_cast<const uint32_t>(header->version) & 0x0000ffff);
+ static_cast<MinidumpHeaderConstants>(
+ static_cast<uint32_t>(header->signature));
+ const MinidumpHeaderConstants version = static_cast<MinidumpHeaderConstants>(
+ static_cast<uint32_t>(header->version) & 0x0000ffff);
// the high 16 bits of the version field are implementation specific
if (error.Fail() || signature != MinidumpHeaderConstants::Signature ||
@@ -115,8 +114,7 @@ const MinidumpMiscInfo *MinidumpMiscInfo
}
llvm::Optional<lldb::pid_t> MinidumpMiscInfo::GetPid() const {
- uint32_t pid_flag =
- static_cast<const uint32_t>(MinidumpMiscInfoFlags::ProcessID);
+ uint32_t pid_flag = static_cast<uint32_t>(MinidumpMiscInfoFlags::ProcessID);
if (flags1 & pid_flag)
return llvm::Optional<lldb::pid_t>(process_id);
More information about the lldb-commits
mailing list