From 8557d298d4f64095ac1e94cf9d74f3c8c24dc12f Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Tue, 16 Aug 2011 01:16:02 +0000 Subject: [PATCH] Fix two logic errors uncovered by the static analyzer. For the default case (illegal encoding type), just return false instead of break. A8.6.84 LDRSH (register) A8.6.309 VLD1 (single element to all lanes) llvm-svn: 137699 --- .../Plugins/Instruction/ARM/EmulateInstructionARM.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp index 4c0de5bcbacf..f729dbb4adcb 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -7657,7 +7657,7 @@ EmulateInstructionARM::EmulateLDRSHRegister (const uint32_t opcode, const ARMEnc break; default: - break; + return false; } uint64_t Rm = ReadRegisterUnsigned (eRegisterKindDWARF, dwarf_r0 + m, 0, &success); @@ -11960,10 +11960,10 @@ EmulateInstructionARM::EmulateVLD1SingleAll (const uint32_t opcode, const ARMEnc if (n == 15) return false; } - break; + break; default: - break; + return false; } RegisterInfo base_reg;