summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-11-23 22:42:07 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-11-24 13:18:41 +0100
commit920f49a20be51170ec1804f2736ea3e2593cdbe5 (patch)
tree2763cccabd025becc428bcb90b6690a98281978d /lib
parent020aa0131bfa733b2a4bd62a010389f9871832df (diff)
downloadcurl-920f49a20be51170ec1804f2736ea3e2593cdbe5.tar.gz
infof/failf calls: fix format specifiers
Update a few format specifiers to match what is being printed. Closes #6241
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c2
-rw-r--r--lib/http2.c4
-rw-r--r--lib/ldap.c2
-rw-r--r--lib/socks_gssapi.c4
-rw-r--r--lib/vquic/ngtcp2.c4
-rw-r--r--lib/vquic/quiche.c6
-rw-r--r--lib/vssh/libssh2.c4
-rw-r--r--lib/vtls/sectransp.c4
8 files changed, 15 insertions, 15 deletions
diff --git a/lib/http.c b/lib/http.c
index d73f83901..c232ed413 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -4003,7 +4003,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
infof(data, "Illegal STS header skipped\n");
#ifdef DEBUGBUILD
else
- infof(data, "Parsed STS header fine (%d entries)\n",
+ infof(data, "Parsed STS header fine (%zu entries)\n",
data->hsts->list.size);
#endif
}
diff --git a/lib/http2.c b/lib/http2.c
index 6d3394f78..b138fb4b0 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -2070,7 +2070,7 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex,
if(acc > MAX_ACC) {
infof(conn->data, "http2_send: Warning: The cumulative length of all "
- "headers exceeds %zu bytes and that could cause the "
+ "headers exceeds %d bytes and that could cause the "
"stream to be rejected.\n", MAX_ACC);
}
}
@@ -2269,7 +2269,7 @@ CURLcode Curl_http2_switched(struct connectdata *conn,
data into stream->mem, overwriting data already there. */
if(H2_BUFSIZE < nread) {
failf(data, "connection buffer size is too small to store data following "
- "HTTP Upgrade response header: buflen=%zu, datalen=%zu",
+ "HTTP Upgrade response header: buflen=%d, datalen=%zu",
H2_BUFSIZE, nread);
return CURLE_HTTP2;
}
diff --git a/lib/ldap.c b/lib/ldap.c
index f6c2b5915..0a1f02d5b 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -923,7 +923,7 @@ static int _ldap_url_parse2(const struct connectdata *conn, LDAPURLDesc *ludp)
char *unescaped;
CURLcode result;
- LDAP_TRACE(("attr[%d] '%s'\n", i, attributes[i]));
+ LDAP_TRACE(("attr[%zu] '%s'\n", i, attributes[i]));
/* Unescape the attribute */
result = Curl_urldecode(conn->data, attributes[i], 0, &unescaped, NULL,
diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c
index 9818a3466..a96579692 100644
--- a/lib/socks_gssapi.c
+++ b/lib/socks_gssapi.c
@@ -493,7 +493,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
gss_release_buffer(&gss_status, &gss_recv_token);
if(gss_w_token.length != 1) {
- failf(data, "Invalid GSS-API encryption response length (%d).",
+ failf(data, "Invalid GSS-API encryption response length (%zu).",
gss_w_token.length);
gss_release_buffer(&gss_status, &gss_w_token);
gss_delete_sec_context(&gss_status, &gss_context, NULL);
@@ -505,7 +505,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
}
else {
if(gss_recv_token.length != 1) {
- failf(data, "Invalid GSS-API encryption response length (%d).",
+ failf(data, "Invalid GSS-API encryption response length (%zu).",
gss_recv_token.length);
gss_release_buffer(&gss_status, &gss_recv_token);
gss_delete_sec_context(&gss_status, &gss_context, NULL);
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c
index 24703564c..c75df6310 100644
--- a/lib/vquic/ngtcp2.c
+++ b/lib/vquic/ngtcp2.c
@@ -1571,7 +1571,7 @@ static CURLcode http_request(struct connectdata *conn, const void *mem,
if(acc > MAX_ACC) {
infof(data, "http_request: Warning: The cumulative length of all "
- "headers exceeds %zu bytes and that could cause the "
+ "headers exceeds %d bytes and that could cause the "
"stream to be rejected.\n", MAX_ACC);
}
}
@@ -1741,7 +1741,7 @@ static CURLcode ng_process_ingress(struct connectdata *conn,
if(SOCKERRNO == EAGAIN || SOCKERRNO == EWOULDBLOCK)
break;
- failf(conn->data, "ngtcp2: recvfrom() unexpectedly returned %d", recvd);
+ failf(conn->data, "ngtcp2: recvfrom() unexpectedly returned %zd", recvd);
return CURLE_RECV_ERROR;
}
diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c
index 2b7a693af..3d9739663 100644
--- a/lib/vquic/quiche.c
+++ b/lib/vquic/quiche.c
@@ -358,7 +358,7 @@ static CURLcode process_ingress(struct connectdata *conn, int sockfd,
break;
if(recvd < 0) {
- failf(conn->data, "quiche: recv() unexpectedly returned %d "
+ failf(conn->data, "quiche: recv() unexpectedly returned %zd "
"(errno: %d, socket %d)", recvd, SOCKERRNO, sockfd);
return CURLE_RECV_ERROR;
}
@@ -368,7 +368,7 @@ static CURLcode process_ingress(struct connectdata *conn, int sockfd,
break;
if(recvd < 0) {
- failf(conn->data, "quiche_conn_recv() == %d", recvd);
+ failf(conn->data, "quiche_conn_recv() == %zd", recvd);
return CURLE_RECV_ERROR;
}
} while(1);
@@ -762,7 +762,7 @@ static CURLcode http_request(struct connectdata *conn, const void *mem,
if(acc > MAX_ACC) {
infof(data, "http_request: Warning: The cumulative length of all "
- "headers exceeds %zu bytes and that could cause the "
+ "headers exceeds %d bytes and that could cause the "
"stream to be rejected.\n", MAX_ACC);
}
}
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c
index aee9a8a67..a69bcda99 100644
--- a/lib/vssh/libssh2.c
+++ b/lib/vssh/libssh2.c
@@ -1265,7 +1265,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
a time-out or similar */
result = CURLE_SSH;
sshc->actualcode = result;
- DEBUGF(infof(data, "error = %d makes libcurl = %d\n",
+ DEBUGF(infof(data, "error = %lu makes libcurl = %d\n",
sftperr, (int)result));
state(conn, SSH_STOP);
break;
@@ -1945,7 +1945,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
sshc->actualcode = CURLE_SSH;
sftperr = LIBSSH2_FX_OK;
}
- failf(data, "Upload failed: %s (%d/%d)",
+ failf(data, "Upload failed: %s (%lu/%d)",
sftperr != LIBSSH2_FX_OK ?
sftp_libssh2_strerror(sftperr):"ssh error",
sftperr, rc);
diff --git a/lib/vtls/sectransp.c b/lib/vtls/sectransp.c
index 4854aa6a5..8ef60cb1f 100644
--- a/lib/vtls/sectransp.c
+++ b/lib/vtls/sectransp.c
@@ -1970,7 +1970,7 @@ static CURLcode sectransp_connect_step1(struct connectdata *conn,
else {
CURLcode result;
ssl_sessionid =
- aprintf("%s:%d:%d:%s:%hu", ssl_cafile,
+ aprintf("%s:%d:%d:%s:%ld", ssl_cafile,
verifypeer, SSL_CONN_CONFIG(verifyhost), hostname, port);
ssl_sessionid_len = strlen(ssl_sessionid);
@@ -2189,7 +2189,7 @@ static CURLcode verify_cert(const char *cafile, struct Curl_easy *data,
if(res < 0) {
free(certbuf);
CFRelease(array);
- failf(data, "SSL: invalid CA certificate #%d (offset %d) in bundle",
+ failf(data, "SSL: invalid CA certificate #%d (offset %zu) in bundle",
n, offset);
return CURLE_SSL_CACERT_BADFILE;
}