From ef4536c38968517405a4429bacf5be0add0ea99e Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Thu, 23 Mar 2017 09:52:26 +0000 Subject: [PATCH] Fix warnings from clang build on macOS. Reviewers: lldb-commits Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D31279 llvm-svn: 298585 --- lldb/source/Expression/LLVMUserExpression.cpp | 3 ++- lldb/source/Host/common/Symbols.cpp | 1 + lldb/source/Host/macosx/Symbols.cpp | 1 + lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp | 1 + .../Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | 1 - 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lldb/source/Expression/LLVMUserExpression.cpp b/lldb/source/Expression/LLVMUserExpression.cpp index c4a43a1..396a7e2 100644 --- a/lldb/source/Expression/LLVMUserExpression.cpp +++ b/lldb/source/Expression/LLVMUserExpression.cpp @@ -49,9 +49,10 @@ LLVMUserExpression::LLVMUserExpression(ExecutionContextScope &exe_scope, const EvaluateExpressionOptions &options) : UserExpression(exe_scope, expr, prefix, language, desired_type, options), m_stack_frame_bottom(LLDB_INVALID_ADDRESS), + m_stack_frame_top(LLDB_INVALID_ADDRESS), m_allow_cxx(false), m_allow_objc(false), - m_stack_frame_top(LLDB_INVALID_ADDRESS), m_transformed_text(), + m_transformed_text(), m_execution_unit_sp(), m_materializer_ap(), m_jit_module_wp(), m_enforce_valid_object(true), m_in_cplusplus_method(false), m_in_objectivec_method(false), m_in_static_method(false), diff --git a/lldb/source/Host/common/Symbols.cpp b/lldb/source/Host/common/Symbols.cpp index e3d5bdf..c45ca11 100644 --- a/lldb/source/Host/common/Symbols.cpp +++ b/lldb/source/Host/common/Symbols.cpp @@ -55,6 +55,7 @@ static bool FileAtPathContainsArchAndUUID(const FileSpec &file_fspec, ModuleSpec spec; for (size_t i = 0; i < module_specs.GetSize(); ++i) { bool got_spec = module_specs.GetModuleSpecAtIndex(i, spec); + UNUSED_IF_ASSERT_DISABLED(got_spec); assert(got_spec); if ((uuid == NULL || (spec.GetUUIDPtr() && spec.GetUUID() == *uuid)) && (arch == NULL || (spec.GetArchitecturePtr() && diff --git a/lldb/source/Host/macosx/Symbols.cpp b/lldb/source/Host/macosx/Symbols.cpp index 17a1302..a508568 100644 --- a/lldb/source/Host/macosx/Symbols.cpp +++ b/lldb/source/Host/macosx/Symbols.cpp @@ -270,6 +270,7 @@ FileSpec Symbols::FindSymbolFileInBundle(const FileSpec &dsym_bundle_fspec, ModuleSpec spec; for (size_t i = 0; i < module_specs.GetSize(); ++i) { bool got_spec = module_specs.GetModuleSpecAtIndex(i, spec); + UNUSED_IF_ASSERT_DISABLED(got_spec); assert(got_spec); if ((uuid == NULL || (spec.GetUUIDPtr() && spec.GetUUID() == *uuid)) && diff --git a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp index d1bc33d..5e933d3 100644 --- a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp +++ b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp @@ -281,6 +281,7 @@ DynamicRegisterInfo::SetRegisterInfo(const StructuredData::Dictionary &dict, // Swap "dwarf_opcode_string" over into "opcode_extractor" opcode_extractor.GetStringRef().swap(dwarf_opcode_string); uint32_t ret_val = opcode_extractor.GetHexBytesAvail(dwarf_opcode_bytes); + UNUSED_IF_ASSERT_DISABLED(ret_val); assert(ret_val == reg_info.dynamic_size_dwarf_len); for (j = 0; j < reg_info.dynamic_size_dwarf_len; ++j) diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index 6271499..66c1b15 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -771,7 +771,6 @@ GDBRemoteCommunicationServerCommon::Handle_vFile_MD5( std::string path; packet.GetHexByteString(path); if (!path.empty()) { - uint64_t a, b; StreamGDBRemote response; auto Result = llvm::sys::fs::md5_contents(path); if (!Result) { -- 2.7.4