]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/http: fix compiler warning
authorGisle Vanem <gvanem@yahoo.no>
Sat, 6 Apr 2024 22:11:03 +0000 (18:11 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 7 Apr 2024 18:21:31 +0000 (14:21 -0400)
- Init result code variable to fix clang warning that it may be used
  uninitialized.

Fixes https://github.com/curl/curl/issues/13301
Closes https://github.com/curl/curl/pull/13304

tests/http/clients/ws-data.c

index 487d109ef312e4956eefe1a3e72222da87690617..e7d52756e8125bdbde8fb26414eded5888f1a978 100644 (file)
@@ -168,7 +168,7 @@ static void websocket_close(CURL *curl)
 
 static CURLcode data_echo(CURL *curl, size_t plen_min, size_t plen_max)
 {
-  CURLcode res;
+  CURLcode res = CURLE_OK;
   size_t len;
   char *send_buf;
   size_t i;