]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
pingpong: fix compiler warning "assigning an enum to unsigned char"
authorStefan Eissing <stefan@eissing.org>
Fri, 28 Apr 2023 07:24:24 +0000 (09:24 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 28 Apr 2023 11:38:21 +0000 (13:38 +0200)
Closes #11050

lib/pingpong.c

index 2f4aa1c34689b95cd474a43122b89c5704eadbba..f3f7cb93cb9b75892f132e8716e9889843e2527a 100644 (file)
@@ -211,7 +211,7 @@ CURLcode Curl_pp_vsendf(struct Curl_easy *data,
 #ifdef HAVE_GSSAPI
   data_sec = conn->data_prot;
   DEBUGASSERT(data_sec > PROT_NONE && data_sec < PROT_LAST);
-  conn->data_prot = data_sec;
+  conn->data_prot = (unsigned char)data_sec;
 #endif
 
   Curl_debug(data, CURLINFO_HEADER_OUT, s, (size_t)bytes_written);
@@ -316,7 +316,7 @@ CURLcode Curl_pp_readresp(struct Curl_easy *data,
                          &gotbytes);
 #ifdef HAVE_GSSAPI
       DEBUGASSERT(prot  > PROT_NONE && prot < PROT_LAST);
-      conn->data_prot = prot;
+      conn->data_prot = (unsigned char)prot;
 #endif
       if(result == CURLE_AGAIN)
         return CURLE_OK; /* return */