diff options
6 files changed, 8 insertions, 3 deletions
diff --git a/lldb/source/DataFormatters/StringPrinter.cpp b/lldb/source/DataFormatters/StringPrinter.cpp index b114add5064..8cdbb53eaa8 100644 --- a/lldb/source/DataFormatters/StringPrinter.cpp +++ b/lldb/source/DataFormatters/StringPrinter.cpp @@ -207,7 +207,7 @@ GetPrintableImpl<StringPrinter::StringElementType::UTF8> (uint8_t* buffer, uint8 else { uint8_t* data = new uint8_t[11]; - sprintf((char*)data,"\\U%08x",codepoint); + sprintf((char *)data, "\\U%08x", (unsigned)codepoint); retval = { data,10,[] (const uint8_t* c) {delete[] c;} }; break; } diff --git a/lldb/source/Expression/ExpressionSourceCode.cpp b/lldb/source/Expression/ExpressionSourceCode.cpp index c4ab7a95d7a..46e78d0c95a 100644 --- a/lldb/source/Expression/ExpressionSourceCode.cpp +++ b/lldb/source/Expression/ExpressionSourceCode.cpp @@ -118,6 +118,8 @@ public: return false; else return true; + default: + return false; } } diff --git a/lldb/source/Plugins/ExpressionParser/Go/GoAST.h b/lldb/source/Plugins/ExpressionParser/Go/GoAST.h index 6d51240eab5..89836a38acb 100644 --- a/lldb/source/Plugins/ExpressionParser/Go/GoAST.h +++ b/lldb/source/Plugins/ExpressionParser/Go/GoAST.h @@ -2764,6 +2764,7 @@ R GoASTExpr::Visit(V* v) const return v->VisitUnaryExpr(llvm::cast<const GoASTUnaryExpr>(this)); default: assert(false && "Invalid kind"); + return R(); } } diff --git a/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp b/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp index a71fca7c5c3..d80332fd546 100644 --- a/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp +++ b/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp @@ -1142,7 +1142,7 @@ EmulateInstructionMIPS::Emulate_SWSP (llvm::MCInst& insn) // We look for sp based non-volatile register stores. if (base == dwarf_sp_mips && nonvolatile_reg_p (src)) { - RegisterInfo reg_info_src; + RegisterInfo reg_info_src = {}; Context context; RegisterValue data_src; context.type = eContextPushRegisterOnStack; diff --git a/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp b/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp index 86c574f2776..4f4d476d62c 100644 --- a/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp +++ b/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp @@ -506,7 +506,7 @@ OperatingSystemGo::Goroutine OperatingSystemGo::CreateGoroutineAtIndex(uint64_t idx, Error &err) { err.Clear(); - Goroutine result; + Goroutine result = {}; ValueObjectSP g = m_allg_sp->GetSyntheticArrayMember(idx, true)->Dereference(err); if (err.Fail()) { diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index e4fe419660e..7480f2d3718 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1504,6 +1504,8 @@ Process::IsAlive () case eStateCrashed: case eStateSuspended: return true; + default: + return false; } } |