[Lldb-commits] [lldb] r292488 - Avoid unused variable warning when assert is disabled.

Hafiz Abid Qadeer via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 19 07:11:02 PST 2017


Author: abidh
Date: Thu Jan 19 09:11:01 2017
New Revision: 292488

URL: http://llvm.org/viewvc/llvm-project?rev=292488&view=rev
Log:
Avoid unused variable warning when assert is disabled.


Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=292488&r1=292487&r2=292488&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Jan 19 09:11:01 2017
@@ -576,7 +576,7 @@ void ProcessGDBRemote::BuildDynamicRegis
             uint32_t ret_val =
                 opcode_extractor.GetHexBytesAvail(dwarf_opcode_bytes);
             assert(dwarf_opcode_len == ret_val);
-
+            UNUSED_IF_ASSERT_DISABLED(ret_val);
             reg_info.dynamic_size_dwarf_expr_bytes = dwarf_opcode_bytes.data();
           }
         }
@@ -4213,7 +4213,7 @@ bool ParseRegisters(XMLNode feature_node
             uint32_t ret_val =
                 opcode_extractor.GetHexBytesAvail(dwarf_opcode_bytes);
             assert(dwarf_opcode_len == ret_val);
-
+            UNUSED_IF_ASSERT_DISABLED(ret_val);
             reg_info.dynamic_size_dwarf_expr_bytes = dwarf_opcode_bytes.data();
           } else {
             printf("unhandled attribute %s = %s\n", name.data(), value.data());




More information about the lldb-commits mailing list