← Commit list

7973cb0b3e

Viktor Szakats
Viktor Szakats
2025-10-29
SUCCESS Duration: 149s

Subject

http: fix `-Wunreachable-code` in !websockets !unity builds

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/http.c+4 -1
@@ -1852,9 +1852,12 @@ void Curl_http_method(struct Curl_easy *data,
{
Curl_HttpReq httpreq = (Curl_HttpReq)data->state.httpreq;
const char *request;
+#ifndef CURL_DISABLE_WEBSOCKETS
if(data->conn->handler->protocol&(CURLPROTO_WS|CURLPROTO_WSS))
httpreq = HTTPREQ_GET;
- else if((data->conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_FTP)) &&
+ else
+#endif
+ if((data->conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_FTP)) &&
data->state.upload)
httpreq = HTTPREQ_PUT;