]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
sendf: store the header type in an usigned char to avoid icc warnings
authorDaniel Stenberg <daniel@haxx.se>
Wed, 20 Jul 2022 10:48:49 +0000 (12:48 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 23 Jul 2022 11:38:50 +0000 (13:38 +0200)
Closes #9179

lib/sendf.c

index 52788fd5fcefc6a6cfb1e79008ba017e16f66e29..62cfd3524f675c1dcdcb776eefcb959089f70237 100644 (file)
@@ -589,12 +589,12 @@ static CURLcode chop_write(struct Curl_easy *data,
   /* HTTP header, but not status-line */
   if((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
      (type & CLIENTWRITE_HEADER) && !(type & CLIENTWRITE_STATUS) ) {
-    CURLcode result =
-      Curl_headers_push(data, optr,
-                        type & CLIENTWRITE_CONNECT ? CURLH_CONNECT :
-                        (type & CLIENTWRITE_1XX ? CURLH_1XX :
-                         (type & CLIENTWRITE_TRAILER ? CURLH_TRAILER :
-                          CURLH_HEADER)));
+    unsigned char htype = (unsigned char)
+      (type & CLIENTWRITE_CONNECT ? CURLH_CONNECT :
+       (type & CLIENTWRITE_1XX ? CURLH_1XX :
+        (type & CLIENTWRITE_TRAILER ? CURLH_TRAILER :
+         CURLH_HEADER)));
+    CURLcode result = Curl_headers_push(data, optr, htype);
     if(result)
       return result;
   }