diff options
author | Zachary Turner <zturner@google.com> | 2014-11-10 22:31:51 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-11-10 22:31:51 +0000 |
commit | 6e96e1211f2057856a815b0bbba7c86186468660 (patch) | |
tree | d0980a805a1ffca11cf5652b3b846a18b9f5a5d1 /source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp | |
parent | 3585127b84e695bfbc5665251a72567fba079a77 (diff) |
Fix some compiler warnings, one of which was a legit bug.
MSVC warns that not all control paths return a value when a switch
doesn't have a default case handler. Changed explicit value checks
to a default check.
Also, it caught a case where bitwise AND was being used instead of
logical AND. I'm not sure what this fixes, but presumably it is
not covered by any kind of test case.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@221636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp')
-rw-r--r-- | source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp b/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp index d6f8f2457..da46fa181 100644 --- a/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp +++ b/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp @@ -840,8 +840,8 @@ loopnext: { ret_insn_offset = m_func_bounds.GetByteSize() - 6; } - else if (bytebuf[0] == 0x5d && bytebuf[1] == 0xc3 - && bytebuf[2] == 0x0f && bytebuf[3] == 0x1f & bytebuf[4] == 0x44) // mov & ret & nop + else if (bytebuf[0] == 0x5d && bytebuf[1] == 0xc3 + && bytebuf[2] == 0x0f && bytebuf[3] == 0x1f && bytebuf[4] == 0x44) // mov & ret & nop { ret_insn_offset = m_func_bounds.GetByteSize() - 6; } |