build: fix -Wformat-signedness by adjusting printf masks

- sync printf masks with the passed value.
- fix a couple of casts.

Cherry-picked from #20848

Closes #21335
This commit is contained in:
Viktor Szakats 2026-04-16 03:16:20 +02:00
parent 54cc65595d
commit 548c16a824
No known key found for this signature in database
56 changed files with 127 additions and 127 deletions

View file

@ -1256,7 +1256,7 @@ CURLcode Curl_http_follow(struct Curl_easy *data, const char *newurl,
curlx_free(portnum);
}
if(port != data->info.conn_remote_port) {
infof(data, "Clear auth, redirects to port from %u to %u",
infof(data, "Clear auth, redirects to port from %d to %d",
data->info.conn_remote_port, port);
clear = TRUE;
}
@ -3761,13 +3761,13 @@ static CURLcode http_statusline(struct Curl_easy *data,
/* no major version switch mid-connection */
if(k->httpversion_sent &&
(k->httpversion / 10 != k->httpversion_sent / 10)) {
failf(data, "Version mismatch (from HTTP/%u to HTTP/%u)",
failf(data, "Version mismatch (from HTTP/%d to HTTP/%d)",
k->httpversion_sent / 10, k->httpversion / 10);
return CURLE_WEIRD_SERVER_REPLY;
}
break;
default:
failf(data, "Unsupported HTTP version (%u.%d) in response",
failf(data, "Unsupported HTTP version (%d.%d) in response",
k->httpversion / 10, k->httpversion % 10);
return CURLE_UNSUPPORTED_PROTOCOL;
}