Skip to content
Permalink
Browse files
[Curl] Suppress warning of unused enum value in switch statement.
https://bugs.webkit.org/show_bug.cgi?id=240672

Reviewed by Fujii Hironori.

Just after the request object creation, the state is WaitingForStart. It is better
the code explicitly takes care of this fact. Also moving the assignment to the state
inside the switch statement denotes the state is changing to the response of previous
state.

No new tests. Covered by existing tests.

* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::start):

Canonical link: https://commits.webkit.org/250766@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
basuke committed May 19, 2022
1 parent a3889af commit e8621c0207e8dfdc59dcbe601154b368794a8885
Showing 1 changed file with 3 additions and 2 deletions.
@@ -116,10 +116,11 @@ void CurlRequest::start()
[[fallthrough]];
case StartState::StartSuspended:
return;
case StartState::WaitingForStart:
m_startState = StartState::DidStart;
break;
}

m_startState = StartState::DidStart;

if (m_request.url().isLocalFile())
invokeDidReceiveResponseForFile(m_request.url());
else

0 comments on commit e8621c0

Please sign in to comment.