[Lldb-commits] [lldb] r250661 - Silence some -Wunused-but-set-variable with gcc 5.2.0
Saleem Abdulrasool via lldb-commits
lldb-commits at lists.llvm.org
Sun Oct 18 12:34:31 PDT 2015
Author: compnerd
Date: Sun Oct 18 14:34:31 2015
New Revision: 250661
URL: http://llvm.org/viewvc/llvm-project?rev=250661&view=rev
Log:
Silence some -Wunused-but-set-variable with gcc 5.2.0
Cleanup some unused variables. NFC.
Modified:
lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
Modified: lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp?rev=250661&r1=250660&r2=250661&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp Sun Oct 18 14:34:31 2015
@@ -908,22 +908,16 @@ EmulateInstructionARM64::EmulateLDRSTRIm
}
MemOp memop;
- bool is_signed;
- uint32_t regsize;
if (Bit32(opc, 1) == 0)
{
memop = Bit32(opc, 0) == 1 ? MemOp_LOAD : MemOp_STORE;
- regsize = size == 3 ? 64 : 32;
- is_signed = false;
}
else
{
memop = MemOp_LOAD;
if (size == 2 && Bit32(opc, 0) == 1)
return false;
- regsize = Bit32(opc, 0) == 1 ? 32 : 64;
- is_signed = true;
}
Error error;
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp?rev=250661&r1=250660&r2=250661&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp Sun Oct 18 14:34:31 2015
@@ -107,7 +107,6 @@ DWARFASTParserGo::ParseTypeFromDWARF(con
dwarf->m_die_to_type[die.GetDIE()] = DIE_IS_BEING_PARSED;
const size_t num_attributes = die.GetAttributes(attributes);
- uint32_t encoding = 0;
lldb::user_id_t encoding_uid = LLDB_INVALID_UID;
if (num_attributes > 0)
@@ -129,7 +128,7 @@ DWARFASTParserGo::ParseTypeFromDWARF(con
byte_size = form_value.Unsigned();
break;
case DW_AT_encoding:
- encoding = form_value.Unsigned();
+ // = form_value.Unsigned();
break;
case DW_AT_type:
encoding_uid = form_value.Reference();
@@ -510,7 +509,6 @@ DWARFASTParserGo::ParseChildParameters(c
const size_t num_attributes = die.GetAttributes(attributes);
if (num_attributes > 0)
{
- const char *name = NULL;
Declaration decl;
dw_offset_t param_type_die_offset = DW_INVALID_OFFSET;
@@ -524,7 +522,7 @@ DWARFASTParserGo::ParseChildParameters(c
switch (attr)
{
case DW_AT_name:
- name = form_value.AsCString();
+ // = form_value.AsCString();
break;
case DW_AT_type:
param_type_die_offset = form_value.Reference();
Modified: lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp?rev=250661&r1=250660&r2=250661&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp (original)
+++ lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp Sun Oct 18 14:34:31 2015
@@ -117,21 +117,13 @@ UnwindAssemblyInstEmulation::GetNonCallS
// cache the pc register number (in whatever register numbering this UnwindPlan uses) for
// quick reference during instruction parsing.
- uint32_t pc_reg_num = LLDB_INVALID_REGNUM;
RegisterInfo pc_reg_info;
- if (m_inst_emulator_ap->GetRegisterInfo (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, pc_reg_info))
- pc_reg_num = pc_reg_info.kinds[unwind_plan.GetRegisterKind()];
- else
- pc_reg_num = LLDB_INVALID_REGNUM;
+ m_inst_emulator_ap->GetRegisterInfo (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, pc_reg_info);
// cache the return address register number (in whatever register numbering this UnwindPlan uses) for
// quick reference during instruction parsing.
- uint32_t ra_reg_num = LLDB_INVALID_REGNUM;
RegisterInfo ra_reg_info;
- if (m_inst_emulator_ap->GetRegisterInfo (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA, ra_reg_info))
- ra_reg_num = ra_reg_info.kinds[unwind_plan.GetRegisterKind()];
- else
- ra_reg_num = LLDB_INVALID_REGNUM;
+ m_inst_emulator_ap->GetRegisterInfo (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA, ra_reg_info);
for (size_t idx=0; idx<num_instructions; ++idx)
{
More information about the lldb-commits
mailing list