[Lldb-commits] [lldb] r298585 - Fix warnings from clang build on macOS.

Bruce Mitchener via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 23 02:52:27 PDT 2017


Author: brucem
Date: Thu Mar 23 04:52:26 2017
New Revision: 298585

URL: http://llvm.org/viewvc/llvm-project?rev=298585&view=rev
Log:
Fix warnings from clang build on macOS.

Reviewers: lldb-commits

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D31279

Modified:
    lldb/trunk/source/Expression/LLVMUserExpression.cpp
    lldb/trunk/source/Host/common/Symbols.cpp
    lldb/trunk/source/Host/macosx/Symbols.cpp
    lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp

Modified: lldb/trunk/source/Expression/LLVMUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/LLVMUserExpression.cpp?rev=298585&r1=298584&r2=298585&view=diff
==============================================================================
--- lldb/trunk/source/Expression/LLVMUserExpression.cpp (original)
+++ lldb/trunk/source/Expression/LLVMUserExpression.cpp Thu Mar 23 04:52:26 2017
@@ -49,9 +49,10 @@ LLVMUserExpression::LLVMUserExpression(E
                                        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),

Modified: lldb/trunk/source/Host/common/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Symbols.cpp?rev=298585&r1=298584&r2=298585&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Symbols.cpp (original)
+++ lldb/trunk/source/Host/common/Symbols.cpp Thu Mar 23 04:52:26 2017
@@ -55,6 +55,7 @@ static bool FileAtPathContainsArchAndUUI
     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() &&

Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=298585&r1=298584&r2=298585&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Thu Mar 23 04:52:26 2017
@@ -270,6 +270,7 @@ FileSpec Symbols::FindSymbolFileInBundle
             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)) &&

Modified: lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp?rev=298585&r1=298584&r2=298585&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp Thu Mar 23 04:52:26 2017
@@ -281,6 +281,7 @@ DynamicRegisterInfo::SetRegisterInfo(con
       // 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)

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp?rev=298585&r1=298584&r2=298585&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp Thu Mar 23 04:52:26 2017
@@ -771,7 +771,6 @@ GDBRemoteCommunicationServerCommon::Hand
   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) {




More information about the lldb-commits mailing list