forked from OSchip/llvm-project
Give old_state a default value so we won't try to restore
an uninitialized value. In reality the code block that initializes it and the code block that restores it will always match up - but the analyzer doesn't know that and I want to quiet it, so... clang static analyzer fixit. llvm-svn: 219869
This commit is contained in:
parent
20893b3611
commit
76513fd9bc
|
@ -4975,7 +4975,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
}
|
||||
|
||||
HostThread backup_private_state_thread;
|
||||
lldb::StateType old_state;
|
||||
lldb::StateType old_state = eStateInvalid;
|
||||
lldb::ThreadPlanSP stopper_base_plan_sp;
|
||||
|
||||
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP | LIBLLDB_LOG_PROCESS));
|
||||
|
@ -5593,8 +5593,8 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
{
|
||||
thread->DiscardThreadPlansUpToPlan(stopper_base_plan_sp);
|
||||
}
|
||||
m_public_state.SetValueNoLock(old_state);
|
||||
|
||||
if (old_state != eStateInvalid)
|
||||
m_public_state.SetValueNoLock(old_state);
|
||||
}
|
||||
|
||||
// Restore the thread state if we are going to discard the plan execution. There are three cases where this
|
||||
|
|
Loading…
Reference in New Issue