Hi jasonmolenda,
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.
http://reviews.llvm.org/D6197
Files:
include/lldb/Interpreter/CommandInterpreter.h
source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
Index: include/lldb/Interpreter/CommandInterpreter.h
===================================================================
--- include/lldb/Interpreter/CommandInterpreter.h
+++ include/lldb/Interpreter/CommandInterpreter.h
@@ -173,11 +173,10 @@
{
switch (flag)
{
- case eLazyBoolCalculate:
- case eLazyBoolYes:
- return true;
case eLazyBoolNo:
return false;
+ default:
+ return true;
}
}
@@ -188,8 +187,7 @@
{
case eLazyBoolYes:
return true;
- case eLazyBoolCalculate:
- case eLazyBoolNo:
+ default:
return false;
}
}
Index: source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
===================================================================
--- source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
+++ source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
@@ -840,8 +840,8 @@
{
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;
}
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits