mirror of
https://github.com/curl/curl.git
synced 2026-07-29 20:48:03 +03:00
build: enable -Wformat-signedness, fix issues found
Adjust code to avoid `-Wformat-signedness` warnings, while making sure
that enums are always cast to a known type when passing them to `printf`
functions, to support compilers and compiler settings where enums are
not default-size signed ints.
- cast integers printed as hex to `unsigned`. (63 times, 20 of them in
`mbedtls.c`)
- cast misc enums to `int` for printing. (31 times)
- cast `CURL_LOCK_DATA_*` enums to `int`. (4 times)
- cast `CURL_FORMADD_*` enums to `int`. (13 times)
- cast `CURLSHE_*` enums to `int`. (3 times)
- cast `CURLUE_*` enums to `int`. (33 times)
- cast `CURLMSG_*` enums to `int`. (6 times)
- cast `CURLE_*` enums to `int`. (~380 times)
- unit1675: fix mask.
Follow-up to 7c34365cce #21879
Ref: #18343 (initial attempt)
Closes #20848
This commit is contained in:
parent
ae2986cdf0
commit
2f3fa479dd
162 changed files with 565 additions and 509 deletions
|
|
@ -250,7 +250,7 @@ if(PICKY_COMPILER)
|
|||
if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.1) OR
|
||||
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 17.0))
|
||||
list(APPEND _picky_enable
|
||||
-Wno-format-signedness # clang 19.1 gcc 5.1 appleclang 17.0 # In clang-cl enums are signed ints by default
|
||||
-Wformat-signedness # clang 19.1 gcc 5.1 appleclang 17.0 # In clang-cl enums are signed ints by default
|
||||
)
|
||||
endif()
|
||||
if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 21.1) OR
|
||||
|
|
@ -306,7 +306,7 @@ if(PICKY_COMPILER)
|
|||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.0)
|
||||
list(APPEND _picky_enable
|
||||
-Warray-bounds=2 # clang 2.9 gcc 5.0 (clang default: -Warray-bounds)
|
||||
-Wno-format-signedness # clang 19.1 gcc 5.1 appleclang 17.0
|
||||
-Wformat-signedness # clang 19.1 gcc 5.1 appleclang 17.0
|
||||
)
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0)
|
||||
|
|
|
|||
|
|
@ -134,14 +134,14 @@ int main(void)
|
|||
const char *url;
|
||||
CURL *curl = msg->easy_handle;
|
||||
curl_easy_getinfo(curl, CURLINFO_PRIVATE, &url);
|
||||
fprintf(stderr, "R: %d - %s <%s>\n",
|
||||
msg->data.result, curl_easy_strerror(msg->data.result), url);
|
||||
fprintf(stderr, "R: %d - %s <%s>\n", (int)msg->data.result,
|
||||
curl_easy_strerror(msg->data.result), url);
|
||||
curl_multi_remove_handle(multi, curl);
|
||||
curl_easy_cleanup(curl);
|
||||
left--;
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "E: CURLMsg (%d)\n", msg->msg);
|
||||
fprintf(stderr, "E: CURLMsg (%d)\n", (int)msg->msg);
|
||||
}
|
||||
if(transfers < NUM_URLS)
|
||||
add_transfer(multi, transfers++, &left);
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ int main(void)
|
|||
close(sockfd);
|
||||
|
||||
if(result != CURLE_OK) {
|
||||
printf("libcurl error: %d\n", result);
|
||||
printf("libcurl error: %d\n", (int)result);
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ int main(void)
|
|||
|
||||
if(result != CURLE_OK) {
|
||||
/* we failed */
|
||||
fprintf(stderr, "curl told us %d\n", result);
|
||||
fprintf(stderr, "curl told us %d\n", (int)result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ int main(void)
|
|||
|
||||
if(result != CURLE_OK) {
|
||||
/* we failed */
|
||||
fprintf(stderr, "curl told us %d\n", result);
|
||||
fprintf(stderr, "curl told us %d\n", (int)result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ int main(void)
|
|||
}
|
||||
else {
|
||||
/* we failed */
|
||||
fprintf(stderr, "curl told us %d\n", result);
|
||||
fprintf(stderr, "curl told us %d\n", (int)result);
|
||||
}
|
||||
|
||||
/* always cleanup */
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ int main(void)
|
|||
|
||||
if(result != CURLE_OK) {
|
||||
/* we failed */
|
||||
fprintf(stderr, "curl told us %d\n", result);
|
||||
fprintf(stderr, "curl told us %d\n", (int)result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ int main(void)
|
|||
failed = 0;
|
||||
}
|
||||
else {
|
||||
mem_addf(&t->log, "Transfer failed: (%d) %s\n", result,
|
||||
mem_addf(&t->log, "Transfer failed: (%d) %s\n", (int)result,
|
||||
(errbuf[0] ? errbuf : curl_easy_strerror(result)));
|
||||
fprintf(stderr, "%s", t->log.recent);
|
||||
failed = 1;
|
||||
|
|
|
|||
|
|
@ -99,10 +99,12 @@ int main(void)
|
|||
|
||||
switch(idx) {
|
||||
case HTTP_HANDLE:
|
||||
printf("HTTP transfer completed with status %d\n", msg->data.result);
|
||||
printf("HTTP transfer completed with status %d\n",
|
||||
(int)msg->data.result);
|
||||
break;
|
||||
case FTP_HANDLE:
|
||||
printf("FTP transfer completed with status %d\n", msg->data.result);
|
||||
printf("FTP transfer completed with status %d\n",
|
||||
(int)msg->data.result);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,10 +177,12 @@ int main(void)
|
|||
|
||||
switch(idx) {
|
||||
case HTTP_HANDLE:
|
||||
printf("HTTP transfer completed with status %d\n", msg->data.result);
|
||||
printf("HTTP transfer completed with status %d\n",
|
||||
(int)msg->data.result);
|
||||
break;
|
||||
case FTP_HANDLE:
|
||||
printf("FTP transfer completed with status %d\n", msg->data.result);
|
||||
printf("FTP transfer completed with status %d\n",
|
||||
(int)msg->data.result);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ int main(void)
|
|||
|
||||
if(result != CURLE_OK) {
|
||||
/* we failed */
|
||||
fprintf(stderr, "curl told us %d\n", result);
|
||||
fprintf(stderr, "curl told us %d\n", (int)result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ int main(int argc, const char **argv)
|
|||
|
||||
for(i = 0; list[i]; i++)
|
||||
printf("SSL backend #%d: '%s' (ID: %d)\n",
|
||||
i, list[i]->name, list[i]->id);
|
||||
i, list[i]->name, (int)list[i]->id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ static size_t read_cb(char *buf, size_t nitems, size_t buflen, void *p)
|
|||
result = curl_ws_start_frame(ctx->curl, CURLWS_TEXT,
|
||||
(curl_off_t)ctx->blen);
|
||||
if(result != CURLE_OK) {
|
||||
fprintf(stderr, "error starting frame: %d\n", result);
|
||||
fprintf(stderr, "error starting frame: %d\n", (int)result);
|
||||
return CURL_READFUNC_ABORT;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ retry:
|
|||
else {
|
||||
/* some other frame arrived. */
|
||||
fprintf(stderr, "ws: received frame of %u bytes rflags %x\n",
|
||||
(unsigned int)rlen, meta->flags);
|
||||
(unsigned int)rlen, (unsigned int)meta->flags);
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ CURLcode Curl_async_take_result(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
CURL_TRC_DNS(data, "ares: is_resolved() result=%d, dns=%sfound",
|
||||
result, *pdns ? "" : "not ");
|
||||
(int)result, *pdns ? "" : "not ");
|
||||
async_ares_cleanup(async);
|
||||
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -635,7 +635,7 @@ CURLcode Curl_async_getaddrinfo(struct Curl_easy *data,
|
|||
out:
|
||||
if(result)
|
||||
CURL_TRC_DNS(data, "error queueing query %s:%d -> %d",
|
||||
async->hostname, async->port, result);
|
||||
async->hostname, async->port, (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -759,7 +759,7 @@ out:
|
|||
(result != CURLE_COULDNT_RESOLVE_HOST) &&
|
||||
(result != CURLE_COULDNT_RESOLVE_PROXY)) {
|
||||
CURL_TRC_DNS(data, "Error %d resolving %s:%d",
|
||||
result, async->hostname, async->port);
|
||||
(int)result, async->hostname, async->port);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ static CURLcode cf_dns_connect(struct Curl_cfilter *cf,
|
|||
}
|
||||
|
||||
if(ctx->resolv_result) {
|
||||
CURL_TRC_CF(data, cf, "error resolving: %d", ctx->resolv_result);
|
||||
CURL_TRC_CF(data, cf, "error resolving: %d", (int)ctx->resolv_result);
|
||||
return ctx->resolv_result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -737,7 +737,8 @@ static CURLcode H1_CONNECT(struct Curl_cfilter *cf,
|
|||
CURL_TRC_CF(data, cf, "CONNECT receive");
|
||||
result = recv_CONNECT_resp(cf, data, ts, &done);
|
||||
if(result)
|
||||
CURL_TRC_CF(data, cf, "error receiving CONNECT response: %d", result);
|
||||
CURL_TRC_CF(data, cf, "error receiving CONNECT response: %d",
|
||||
(int)result);
|
||||
if(!result)
|
||||
result = Curl_pgrsUpdate(data);
|
||||
/* error or not complete yet. return for more multi-multi */
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ static CURLcode proxy_h2_nw_out_writer(void *writer_ctx,
|
|||
CURLcode result;
|
||||
result = Curl_conn_cf_send(cf->next, data, buf, buflen, FALSE, pnwritten);
|
||||
CURL_TRC_CF(data, cf, "[0] nw_out_writer(len=%zu) -> %d, %zu",
|
||||
buflen, result, *pnwritten);
|
||||
buflen, (int)result, *pnwritten);
|
||||
return result;
|
||||
}
|
||||
return CURLE_FAILED_INIT;
|
||||
|
|
@ -371,7 +371,7 @@ static CURLcode proxy_h2_progress_ingress(struct Curl_cfilter *cf,
|
|||
|
||||
result = Curl_cf_recv_bufq(cf->next, data, &ctx->inbufq, 0, &nread);
|
||||
CURL_TRC_CF(data, cf, "[0] read %zu bytes nw data -> %d, %zu",
|
||||
Curl_bufq_len(&ctx->inbufq), result, nread);
|
||||
Curl_bufq_len(&ctx->inbufq), (int)result, nread);
|
||||
if(result) {
|
||||
if(result != CURLE_AGAIN) {
|
||||
failf(data, "Failed receiving HTTP2 proxy data");
|
||||
|
|
@ -975,7 +975,7 @@ static CURLcode cf_h2_proxy_ctx_init(struct Curl_cfilter *cf,
|
|||
out:
|
||||
if(cbs)
|
||||
nghttp2_session_callbacks_del(cbs);
|
||||
CURL_TRC_CF(data, cf, "[0] init proxy ctx -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "[0] init proxy ctx -> %d", (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1135,7 +1135,7 @@ static CURLcode cf_h2_proxy_adjust_pollset(struct Curl_cfilter *cf,
|
|||
|
||||
result = Curl_pollset_set(data, ps, sock, want_recv, want_send);
|
||||
CURL_TRC_CF(data, cf, "adjust_pollset, want_recv=%d want_send=%d -> %d",
|
||||
want_recv, want_send, result);
|
||||
want_recv, want_send, (int)result);
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
}
|
||||
else if(ctx->sent_goaway && !cf->shutdown) {
|
||||
|
|
@ -1147,7 +1147,7 @@ static CURLcode cf_h2_proxy_adjust_pollset(struct Curl_cfilter *cf,
|
|||
want_recv = nghttp2_session_want_read(ctx->h2);
|
||||
result = Curl_pollset_set(data, ps, sock, want_recv, want_send);
|
||||
CURL_TRC_CF(data, cf, "adjust_pollset, want_recv=%d want_send=%d -> %d",
|
||||
want_recv, want_send, result);
|
||||
want_recv, want_send, (int)result);
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
}
|
||||
return result;
|
||||
|
|
@ -1196,7 +1196,7 @@ static CURLcode tunnel_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
}
|
||||
|
||||
CURL_TRC_CF(data, cf, "[%d] tunnel_recv(len=%zu) -> %d, %zu",
|
||||
ctx->tunnel.stream_id, len, result, *pnread);
|
||||
ctx->tunnel.stream_id, len, (int)result, *pnread);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1242,7 +1242,7 @@ out:
|
|||
drain_tunnel(cf, data, &ctx->tunnel);
|
||||
}
|
||||
CURL_TRC_CF(data, cf, "[%d] cf_recv(len=%zu) -> %d, %zu",
|
||||
ctx->tunnel.stream_id, len, result, *pnread);
|
||||
ctx->tunnel.stream_id, len, (int)result, *pnread);
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1272,7 +1272,8 @@ static CURLcode cf_h2_proxy_send(struct Curl_cfilter *cf,
|
|||
}
|
||||
|
||||
result = Curl_bufq_write(&ctx->tunnel.sendbuf, buf, len, pnwritten);
|
||||
CURL_TRC_CF(data, cf, "cf_send(), bufq_write %d, %zu", result, *pnwritten);
|
||||
CURL_TRC_CF(data, cf, "cf_send(), bufq_write %d, %zu", (int)result,
|
||||
*pnwritten);
|
||||
if(result && (result != CURLE_AGAIN))
|
||||
goto out;
|
||||
|
||||
|
|
@ -1310,7 +1311,7 @@ out:
|
|||
}
|
||||
CURL_TRC_CF(data, cf, "[%d] cf_send(len=%zu) -> %d, %zu, "
|
||||
"h2 windows %d-%d (stream-conn), buffers %zu-%zu (stream-conn)",
|
||||
ctx->tunnel.stream_id, len, result, *pnwritten,
|
||||
ctx->tunnel.stream_id, len, (int)result, *pnwritten,
|
||||
nghttp2_session_get_stream_remote_window_size(
|
||||
ctx->h2, ctx->tunnel.stream_id),
|
||||
nghttp2_session_get_remote_window_size(ctx->h2),
|
||||
|
|
@ -1342,7 +1343,7 @@ static CURLcode cf_h2_proxy_flush(struct Curl_cfilter *cf,
|
|||
out:
|
||||
CURL_TRC_CF(data, cf, "[%d] flush -> %d, "
|
||||
"h2 windows %d-%d (stream-conn), buffers %zu-%zu (stream-conn)",
|
||||
ctx->tunnel.stream_id, result,
|
||||
ctx->tunnel.stream_id, (int)result,
|
||||
nghttp2_session_get_stream_remote_window_size(
|
||||
ctx->h2, ctx->tunnel.stream_id),
|
||||
nghttp2_session_get_remote_window_size(ctx->h2),
|
||||
|
|
|
|||
|
|
@ -575,7 +575,7 @@ static CURLcode cf_hc_connect(struct Curl_cfilter *cf,
|
|||
}
|
||||
|
||||
out:
|
||||
CURL_TRC_CF(data, cf, "connect -> %d, done=%d", result, *done);
|
||||
CURL_TRC_CF(data, cf, "connect -> %d, done=%d", (int)result, *done);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -615,7 +615,7 @@ static CURLcode cf_hc_shutdown(struct Curl_cfilter *cf,
|
|||
result = ctx->ballers[i].result;
|
||||
}
|
||||
}
|
||||
CURL_TRC_CF(data, cf, "shutdown -> %d, done=%d", result, *done);
|
||||
CURL_TRC_CF(data, cf, "shutdown -> %d, done=%d", (int)result, *done);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -634,7 +634,8 @@ static CURLcode cf_hc_adjust_pollset(struct Curl_cfilter *cf,
|
|||
continue;
|
||||
result = Curl_conn_cf_adjust_pollset(b->cf, data, ps);
|
||||
}
|
||||
CURL_TRC_CF(data, cf, "adjust_pollset -> %d, %u socks", result, ps->n);
|
||||
CURL_TRC_CF(data, cf, "adjust_pollset -> %d, %u socks", (int)result,
|
||||
ps->n);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@ evaluate:
|
|||
bs->cf_create);
|
||||
CURL_TRC_CF(data, cf, "starting %s attempt for ipv%s -> %d",
|
||||
bs->running ? "next" : "first",
|
||||
(ai_family == AF_INET) ? "4" : "6", result);
|
||||
(ai_family == AF_INET) ? "4" : "6", (int)result);
|
||||
if(result)
|
||||
goto out;
|
||||
DEBUGASSERT(a);
|
||||
|
|
@ -526,7 +526,7 @@ evaluate:
|
|||
if(!a->inconclusive)
|
||||
continue;
|
||||
result = cf_ip_attempt_restart(a, cf, data);
|
||||
CURL_TRC_CF(data, cf, "restarted baller %d -> %d", i, result);
|
||||
CURL_TRC_CF(data, cf, "restarted baller %d -> %d", i, (int)result);
|
||||
if(result) /* serious failure */
|
||||
goto out;
|
||||
bs->last_attempt_started = *Curl_pgrs_now(data);
|
||||
|
|
@ -549,7 +549,7 @@ evaluate:
|
|||
result = CURLE_COULDNT_CONNECT;
|
||||
VERBOSE(i = 0);
|
||||
for(a = bs->running; a; a = a->next) {
|
||||
CURL_TRC_CF(data, cf, "baller %d: result=%d", i, a->result);
|
||||
CURL_TRC_CF(data, cf, "baller %d: result=%d", i, (int)a->result);
|
||||
if(a->result)
|
||||
result = a->result;
|
||||
}
|
||||
|
|
@ -813,7 +813,7 @@ static CURLcode cf_ip_happy_shutdown(struct Curl_cfilter *cf,
|
|||
}
|
||||
|
||||
result = cf_ip_ballers_shutdown(&ctx->ballers, data, done);
|
||||
CURL_TRC_CF(data, cf, "shutdown -> %d, done=%d", result, *done);
|
||||
CURL_TRC_CF(data, cf, "shutdown -> %d, done=%d", (int)result, *done);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -826,7 +826,8 @@ static CURLcode cf_ip_happy_adjust_pollset(struct Curl_cfilter *cf,
|
|||
|
||||
if(!cf->connected) {
|
||||
result = cf_ip_ballers_pollset(&ctx->ballers, data, ps);
|
||||
CURL_TRC_CF(data, cf, "adjust_pollset -> %d, %u socks", result, ps->n);
|
||||
CURL_TRC_CF(data, cf, "adjust_pollset -> %d, %u socks", (int)result,
|
||||
ps->n);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1238,7 +1238,7 @@ out:
|
|||
cf->connected = TRUE;
|
||||
}
|
||||
CURL_TRC_CF(data, cf, "cf_socket_open() -> %d, fd=%" FMT_SOCKET_T,
|
||||
result, ctx->sock);
|
||||
(int)result, ctx->sock);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1530,7 +1530,7 @@ static CURLcode cf_socket_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
#endif
|
||||
|
||||
CURL_TRC_CF(data, cf, "send(len=%zu) -> %d, %zu",
|
||||
orig_len, result, *pnwritten);
|
||||
orig_len, (int)result, *pnwritten);
|
||||
cf->conn->sock[cf->sockindex] = fdsave;
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1589,7 +1589,7 @@ static CURLcode cf_socket_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
}
|
||||
}
|
||||
|
||||
CURL_TRC_CF(data, cf, "recv(len=%zu) -> %d, %zu", len, result, *pnread);
|
||||
CURL_TRC_CF(data, cf, "recv(len=%zu) -> %d, %zu", len, (int)result, *pnread);
|
||||
if(!result && !ctx->got_first_byte) {
|
||||
ctx->first_byte_at = *Curl_pgrs_now(data);
|
||||
ctx->got_first_byte = TRUE;
|
||||
|
|
@ -1899,7 +1899,8 @@ static CURLcode cf_udp_connect(struct Curl_cfilter *cf,
|
|||
if(ctx->sock == CURL_SOCKET_BAD) {
|
||||
result = cf_socket_open(cf, data);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "cf_udp_connect(), open failed -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "cf_udp_connect(), open failed -> %d",
|
||||
(int)result);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
@ -2132,7 +2133,7 @@ static CURLcode cf_tcp_accept_connect(struct Curl_cfilter *cf,
|
|||
CURL_TRC_CF(data, cf, "Checking for incoming on fd=%" FMT_SOCKET_T
|
||||
" ip=%s:%d", ctx->sock, ctx->ip.local_ip, ctx->ip.local_port);
|
||||
socketstate = SOCKET_READABLE(ctx->sock, 0);
|
||||
CURL_TRC_CF(data, cf, "socket_check -> %x", socketstate);
|
||||
CURL_TRC_CF(data, cf, "socket_check -> %x", (unsigned int)socketstate);
|
||||
switch(socketstate) {
|
||||
case -1: /* error */
|
||||
/* let's die here */
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ CURLcode Curl_conn_shutdown(struct Curl_easy *data, int sockindex, bool *done)
|
|||
bool cfdone = FALSE;
|
||||
result = cf->cft->do_shutdown(cf, data, &cfdone);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "shut down failed with %d", result);
|
||||
CURL_TRC_CF(data, cf, "shut down failed with %d", (int)result);
|
||||
return result;
|
||||
}
|
||||
else if(!cfdone) {
|
||||
|
|
@ -553,7 +553,7 @@ CURLcode Curl_conn_connect(struct Curl_easy *data,
|
|||
|
||||
result = cf->cft->do_connect(cf, data, done);
|
||||
CURL_TRC_CF(data, cf, "Curl_conn_connect(block=%d) -> %d, done=%d",
|
||||
blocking, result, *done);
|
||||
blocking, (int)result, *done);
|
||||
if(!result && *done) {
|
||||
/* Now that the complete filter chain is connected, let all filters
|
||||
* persist information at the connection. E.g. cf-socket sets the
|
||||
|
|
@ -568,7 +568,8 @@ CURLcode Curl_conn_connect(struct Curl_easy *data,
|
|||
goto out;
|
||||
}
|
||||
else if(result) {
|
||||
CURL_TRC_CF(data, cf, "Curl_conn_connect(), filter returned %d", result);
|
||||
CURL_TRC_CF(data, cf, "Curl_conn_connect(), filter returned %d",
|
||||
(int)result);
|
||||
VERBOSE(Curl_conn_trc_filters(data, sockindex, "failed to connect"));
|
||||
conn_report_connect_stats(cf, data);
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -360,7 +360,8 @@ static CURLcode cf_setup_add_haproxy(struct Curl_cfilter *cf,
|
|||
}
|
||||
result = Curl_cf_haproxy_insert_after(cf, data);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "adding HAPROXY filter failed -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "adding HAPROXY filter failed -> %d",
|
||||
(int)result);
|
||||
return result;
|
||||
}
|
||||
CURL_TRC_CF(data, cf, "added HAPROXY filter");
|
||||
|
|
@ -391,7 +392,7 @@ static CURLcode cf_setup_add_socks(struct Curl_cfilter *cf,
|
|||
cf->conn->socks_proxy.proxytype,
|
||||
cf->conn->socks_proxy.creds);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "adding SOCKS filter failed -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "adding SOCKS filter failed -> %d", (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -417,7 +418,7 @@ static CURLcode cf_setup_add_http_proxy(struct Curl_cfilter *cf,
|
|||
cf, data, cf->conn->http_proxy.peer);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "adding SSL filter for HTTP proxy failed -> %d",
|
||||
result);
|
||||
(int)result);
|
||||
return result;
|
||||
}
|
||||
CURL_TRC_CF(data, cf, "added SSL filter for HTTP proxy");
|
||||
|
|
@ -433,7 +434,7 @@ static CURLcode cf_setup_add_http_proxy(struct Curl_cfilter *cf,
|
|||
ctx->transport, cf->conn->http_proxy.proxytype);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "adding HTTP proxy tunnel filter failed -> %d",
|
||||
result);
|
||||
(int)result);
|
||||
return result;
|
||||
}
|
||||
CURL_TRC_CF(data, cf, "added HTTP proxy tunnel filter");
|
||||
|
|
@ -481,7 +482,7 @@ static CURLcode cf_setup_add_ip_happy(struct Curl_cfilter *cf,
|
|||
first_transport,
|
||||
tunnel_peer, ctx->transport);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "adding happy eyeballs failed -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "adding happy eyeballs failed -> %d", (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -522,12 +523,13 @@ static CURLcode cf_setup_add_origin_filters(struct Curl_cfilter *cf,
|
|||
|
||||
result = Curl_cf_capsule_insert_after(cf, data);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "adding capsule filter failed -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "adding capsule filter failed -> %d",
|
||||
(int)result);
|
||||
return result;
|
||||
}
|
||||
result = Curl_cf_quic_insert_after(cf, origin, peer);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "adding QUIC filter failed -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "adding QUIC filter failed -> %d", (int)result);
|
||||
return result;
|
||||
}
|
||||
CURL_TRC_CF(data, cf, "added QUIC filter for origin");
|
||||
|
|
@ -548,7 +550,7 @@ static CURLcode cf_setup_add_origin_filters(struct Curl_cfilter *cf,
|
|||
result = Curl_cf_ssl_insert_after(cf, data, origin, peer);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "adding SSL filter for origin failed -> %d",
|
||||
result);
|
||||
(int)result);
|
||||
return result;
|
||||
}
|
||||
CURL_TRC_CF(data, cf, "added SSL filter for origin");
|
||||
|
|
|
|||
|
|
@ -820,7 +820,8 @@ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
|
|||
|
||||
result = Curl_cwriter_create(&writer, data, cwt, phase);
|
||||
CURL_TRC_WRITE(data, "added %s decoder %s -> %d",
|
||||
is_transfer ? "transfer" : "content", cwt->name, result);
|
||||
is_transfer ? "transfer" : "content", cwt->name,
|
||||
(int)result);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ static OM_uint32 stub_gss_init_sec_context(
|
|||
used = curl_msnprintf(token, length, "%s:%.*s:%d:", creds,
|
||||
(int)target_desc.length,
|
||||
(const char *)target_desc.value,
|
||||
ctx->sent);
|
||||
(int)ctx->sent);
|
||||
|
||||
gss_release_buffer(&minor_status, &target_desc);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ const char *curlx_strerror(int err, char *buf, size_t buflen)
|
|||
!get_winsock_error(err, buf, buflen) &&
|
||||
#endif
|
||||
!curlx_get_winapi_error((DWORD)err, buf, buflen))
|
||||
SNPRINTF(buf, buflen, "Unknown error %d (%#x)", err, err);
|
||||
SNPRINTF(buf, buflen, "Unknown error %d (%#x)", err, (unsigned int)err);
|
||||
#else /* !_WIN32 */
|
||||
|
||||
#if defined(HAVE_STRERROR_R) && defined(HAVE_POSIX_STRERROR_R)
|
||||
|
|
|
|||
|
|
@ -117,7 +117,8 @@ static CURLcode cw_pause_flush(struct Curl_easy *data,
|
|||
result = Curl_cwriter_write(data, cw_pause->next, (*plast)->type,
|
||||
(const char *)buf, wlen);
|
||||
CURL_TRC_WRITE(data, "[PAUSE] flushed %zu/%zu bytes, type=%x -> %d",
|
||||
wlen, ctx->buf_total, (*plast)->type, result);
|
||||
wlen, ctx->buf_total, (unsigned int)(*plast)->type,
|
||||
(int)result);
|
||||
Curl_bufq_skip(&(*plast)->b, wlen);
|
||||
DEBUGASSERT(ctx->buf_total >= wlen);
|
||||
ctx->buf_total -= wlen;
|
||||
|
|
@ -128,7 +129,8 @@ static CURLcode cw_pause_flush(struct Curl_easy *data,
|
|||
result = Curl_cwriter_write(data, cw_pause->next, (*plast)->type,
|
||||
(const char *)buf, 0);
|
||||
CURL_TRC_WRITE(data, "[PAUSE] flushed 0/%zu bytes, type=%x -> %d",
|
||||
ctx->buf_total, (*plast)->type, result);
|
||||
ctx->buf_total, (unsigned int)(*plast)->type,
|
||||
(int)result);
|
||||
}
|
||||
|
||||
if(Curl_bufq_is_empty(&(*plast)->b)) {
|
||||
|
|
@ -165,7 +167,7 @@ static CURLcode cw_pause_write(struct Curl_easy *data,
|
|||
wtype &= ~CLIENTWRITE_EOS;
|
||||
result = Curl_cwriter_write(data, writer->next, wtype, buf, wlen);
|
||||
CURL_TRC_WRITE(data, "[PAUSE] writing %zu/%zu bytes of type %x -> %d",
|
||||
wlen, blen, wtype, result);
|
||||
wlen, blen, (unsigned int)wtype, (int)result);
|
||||
if(result)
|
||||
return result;
|
||||
buf += wlen;
|
||||
|
|
@ -191,8 +193,8 @@ static CURLcode cw_pause_write(struct Curl_easy *data,
|
|||
result = Curl_bufq_cwrite(&ctx->buf->b, buf, blen, &nwritten);
|
||||
}
|
||||
CURL_TRC_WRITE(data, "[PAUSE] buffer %zu more bytes of type %x, "
|
||||
"total=%zu -> %d", nwritten, type, ctx->buf_total + wlen,
|
||||
result);
|
||||
"total=%zu -> %d", nwritten, (unsigned int)type,
|
||||
ctx->buf_total + wlen, (int)result);
|
||||
if(result)
|
||||
return result;
|
||||
buf += nwritten;
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ static CURLcode doh_probe_run(struct Curl_easy *data,
|
|||
sizeof(doh_req->req_body),
|
||||
&doh_req->req_body_len);
|
||||
if(d) {
|
||||
failf(data, "Failed to encode DoH packet [%d]", d);
|
||||
failf(data, "Failed to encode DoH packet [%d]", (int)d);
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
goto error;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -732,7 +732,7 @@ static CURLcode getftpresponse(struct Curl_easy *data,
|
|||
|
||||
pp->pending_resp = FALSE;
|
||||
CURL_TRC_FTP(data, "getftpresponse -> result=%d, nread=%zu, ftpcode=%d",
|
||||
result, *nreadp, *ftpcodep);
|
||||
(int)result, *nreadp, *ftpcodep);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -3839,7 +3839,7 @@ static CURLcode ftp_done(struct Curl_easy *data, CURLcode status,
|
|||
/* Send any post-transfer QUOTE strings? */
|
||||
if(!status && !result && !premature && data->set.postquote)
|
||||
result = ftp_sendquote(data, ftpc, data->set.postquote);
|
||||
CURL_TRC_FTP(data, "[%s] done, result=%d", FTP_CSTATE(ftpc), result);
|
||||
CURL_TRC_FTP(data, "[%s] done, result=%d", FTP_CSTATE(ftpc), (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -4448,7 +4448,8 @@ static CURLcode ftp_setup_connection(struct Curl_easy *data,
|
|||
ftpc->use_ssl = data->set.use_ssl;
|
||||
ftpc->ccc = data->set.ftp_ccc;
|
||||
|
||||
CURL_TRC_FTP(data, "[%s] setup connection -> %d", FTP_CSTATE(ftpc), result);
|
||||
CURL_TRC_FTP(data, "[%s] setup connection -> %d", FTP_CSTATE(ftpc),
|
||||
(int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ static CURLcode hds_cw_collect_write(struct Curl_easy *data,
|
|||
CURLH_HEADER)));
|
||||
CURLcode result = Curl_headers_push(data, buf, blen, htype);
|
||||
CURL_TRC_WRITE(data, "header_collect pushed(type=%x, len=%zu) -> %d",
|
||||
htype, blen, result);
|
||||
htype, blen, (int)result);
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -734,7 +734,7 @@ out:
|
|||
failf(data, "Could not resolve: %s:%u", hostname, port);
|
||||
}
|
||||
else {
|
||||
failf(data, "Error %d resolving %s:%u", result, hostname, port);
|
||||
failf(data, "Error %d resolving %s:%u", (int)result, hostname, port);
|
||||
}
|
||||
}
|
||||
else if(cache_dns && *pdns) {
|
||||
|
|
@ -1073,7 +1073,7 @@ CURLcode Curl_resolv_take_result(struct Curl_easy *data, uint32_t resolv_id,
|
|||
}
|
||||
else if(result) {
|
||||
failf(data, "Error %d resolving %s:%u",
|
||||
result, async->hostname, async->port);
|
||||
(int)result, async->hostname, async->port);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
36
lib/http2.c
36
lib/http2.c
|
|
@ -853,7 +853,7 @@ static int push_promise(struct Curl_cfilter *cf,
|
|||
|
||||
result = http2_data_setup(cf, newhandle, &newstream);
|
||||
if(result) {
|
||||
failf(data, "error setting up stream: %d", result);
|
||||
failf(data, "error setting up stream: %d", (int)result);
|
||||
discard_newhandle(cf, newhandle);
|
||||
rv = CURL_PUSH_DENY;
|
||||
goto fail;
|
||||
|
|
@ -902,7 +902,7 @@ static void h2_xfer_write_resp_hd(struct Curl_cfilter *cf,
|
|||
stream->xfer_result = cf_h2_update_local_win(cf, data, stream);
|
||||
if(stream->xfer_result)
|
||||
CURL_TRC_CF(data, cf, "[%d] error %d writing %zu bytes of headers",
|
||||
stream->id, stream->xfer_result, blen);
|
||||
stream->id, (int)stream->xfer_result, blen);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -919,7 +919,7 @@ static void h2_xfer_write_resp(struct Curl_cfilter *cf,
|
|||
struct cf_h2_ctx *ctx = cf->ctx;
|
||||
CURL_TRC_CF(data, cf, "[%d] error %d writing %zu bytes of data, "
|
||||
"RST-ing stream",
|
||||
stream->id, stream->xfer_result, blen);
|
||||
stream->id, (int)stream->xfer_result, blen);
|
||||
nghttp2_submit_rst_stream(ctx->h2, 0, stream->id,
|
||||
(uint32_t)NGHTTP2_ERR_CALLBACK_FAILURE);
|
||||
}
|
||||
|
|
@ -1383,7 +1383,7 @@ static void cf_h2_header_error(struct Curl_cfilter *cf,
|
|||
{
|
||||
struct cf_h2_ctx *ctx = cf->ctx;
|
||||
|
||||
failf(data, "Error receiving HTTP2 header: %d(%s)", result,
|
||||
failf(data, "Error receiving HTTP2 header: %d(%s)", (int)result,
|
||||
curl_easy_strerror(result));
|
||||
if(stream) {
|
||||
nghttp2_submit_rst_stream(ctx->h2, NGHTTP2_FLAG_NONE,
|
||||
|
|
@ -1614,7 +1614,7 @@ static ssize_t req_body_read_callback(nghttp2_session *session,
|
|||
nread = (ssize_t)n;
|
||||
|
||||
CURL_TRC_CF(data_s, cf, "[%d] req_body_read(len=%zu) eos=%d -> %zd, %d",
|
||||
stream_id, length, stream->body_eos, nread, result);
|
||||
stream_id, length, stream->body_eos, nread, (int)result);
|
||||
|
||||
if(stream->body_eos && Curl_bufq_is_empty(&stream->sendbuf)) {
|
||||
*data_flags = NGHTTP2_DATA_FLAG_EOF;
|
||||
|
|
@ -1748,7 +1748,7 @@ static CURLcode http2_handle_stream_close(struct Curl_cfilter *cf,
|
|||
result = CURLE_OK;
|
||||
|
||||
out:
|
||||
CURL_TRC_CF(data, cf, "handle_stream_close -> %d, %zu", result, *pnlen);
|
||||
CURL_TRC_CF(data, cf, "handle_stream_close -> %d, %zu", (int)result, *pnlen);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1857,7 +1857,7 @@ static CURLcode stream_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
|
||||
if(result && (result != CURLE_AGAIN))
|
||||
CURL_TRC_CF(data, cf, "[%d] stream_recv(len=%zu) -> %d, %zu",
|
||||
stream->id, len, result, *pnread);
|
||||
stream->id, len, (int)result, *pnread);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1908,7 +1908,7 @@ static CURLcode h2_progress_ingress(struct Curl_cfilter *cf,
|
|||
result = Curl_cf_recv_bufq(cf->next, data, &ctx->inbufq, 0, &nread);
|
||||
if(result) {
|
||||
if(result != CURLE_AGAIN) {
|
||||
failf(data, "Failed receiving HTTP2 data: %d(%s)", result,
|
||||
failf(data, "Failed receiving HTTP2 data: %d(%s)", (int)result,
|
||||
curl_easy_strerror(result));
|
||||
return result;
|
||||
}
|
||||
|
|
@ -2003,7 +2003,7 @@ out:
|
|||
}
|
||||
CURL_TRC_CF(data, cf, "[%d] cf_recv(len=%zu) -> %d, %zu, "
|
||||
"window=%d/%d, connection %d/%d",
|
||||
stream->id, len, result, *pnread,
|
||||
stream->id, len, (int)result, *pnread,
|
||||
nghttp2_session_get_stream_effective_recv_data_length(
|
||||
ctx->h2, stream->id),
|
||||
nghttp2_session_get_stream_effective_local_window_size(
|
||||
|
|
@ -2188,7 +2188,7 @@ static CURLcode h2_submit(struct h2_stream_ctx **pstream,
|
|||
|
||||
out:
|
||||
CURL_TRC_CF(data, cf, "[%d] submit -> %d, %zu",
|
||||
stream ? stream->id : -1, result, *pnwritten);
|
||||
stream ? stream->id : -1, (int)result, *pnwritten);
|
||||
curlx_safefree(nva);
|
||||
*pstream = stream;
|
||||
Curl_dynhds_free(&h2_headers);
|
||||
|
|
@ -2222,7 +2222,7 @@ static CURLcode cf_h2_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
DEBUGASSERT(eos);
|
||||
result = cf_h2_body_send(cf, data, stream, buf, 0, eos, &n);
|
||||
CURL_TRC_CF(data, cf, "[%d] cf_body_send last CHUNK -> %d, %zu, eos=%d",
|
||||
stream->id, result, n, eos);
|
||||
stream->id, (int)result, n, eos);
|
||||
if(result)
|
||||
goto out;
|
||||
*pnwritten = len;
|
||||
|
|
@ -2230,7 +2230,7 @@ static CURLcode cf_h2_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
else {
|
||||
result = cf_h2_body_send(cf, data, stream, buf, len, eos, pnwritten);
|
||||
CURL_TRC_CF(data, cf, "[%d] cf_body_send(len=%zu) -> %d, %zu, eos=%d",
|
||||
stream->id, len, result, *pnwritten, eos);
|
||||
stream->id, len, (int)result, *pnwritten, eos);
|
||||
}
|
||||
|
||||
/* Call the nghttp2 send loop and flush to write ALL buffered data,
|
||||
|
|
@ -2266,7 +2266,7 @@ out:
|
|||
CURL_TRC_CF(data, cf, "[%d] cf_send(len=%zu) -> %d, %zu, "
|
||||
"eos=%d, h2 windows %d-%d (stream-conn), "
|
||||
"buffers %zu-%zu (stream-conn)",
|
||||
stream->id, len, result, *pnwritten,
|
||||
stream->id, len, (int)result, *pnwritten,
|
||||
stream->body_eos,
|
||||
nghttp2_session_get_stream_remote_window_size(
|
||||
ctx->h2, stream->id),
|
||||
|
|
@ -2277,7 +2277,7 @@ out:
|
|||
else {
|
||||
CURL_TRC_CF(data, cf, "cf_send(len=%zu) -> %d, %zu, "
|
||||
"connection-window=%d, nw_send_buffer(%zu)",
|
||||
len, result, *pnwritten,
|
||||
len, (int)result, *pnwritten,
|
||||
nghttp2_session_get_remote_window_size(ctx->h2),
|
||||
Curl_bufq_len(&ctx->outbufq));
|
||||
}
|
||||
|
|
@ -2310,7 +2310,7 @@ out:
|
|||
CURL_TRC_CF(data, cf, "[%d] flush -> %d, "
|
||||
"h2 windows %d-%d (stream-conn), "
|
||||
"buffers %zu-%zu (stream-conn)",
|
||||
stream->id, result,
|
||||
stream->id, (int)result,
|
||||
nghttp2_session_get_stream_remote_window_size(
|
||||
ctx->h2, stream->id),
|
||||
nghttp2_session_get_remote_window_size(ctx->h2),
|
||||
|
|
@ -2320,7 +2320,7 @@ out:
|
|||
else {
|
||||
CURL_TRC_CF(data, cf, "flush -> %d, "
|
||||
"connection-window=%d, nw_send_buffer(%zu)",
|
||||
result, nghttp2_session_get_remote_window_size(ctx->h2),
|
||||
(int)result, nghttp2_session_get_remote_window_size(ctx->h2),
|
||||
Curl_bufq_len(&ctx->outbufq));
|
||||
}
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
|
|
@ -2539,7 +2539,7 @@ static CURLcode cf_h2_connect(struct Curl_cfilter *cf,
|
|||
result = CURLE_OK;
|
||||
|
||||
out:
|
||||
CURL_TRC_CF(data, cf, "cf_connect() -> %d, %d, ", result, *done);
|
||||
CURL_TRC_CF(data, cf, "cf_connect() -> %d, %d, ", (int)result, *done);
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -2922,7 +2922,7 @@ CURLcode Curl_http2_upgrade(struct Curl_easy *data,
|
|||
result = Curl_bufq_write(&ctx->inbufq,
|
||||
(const unsigned char *)mem, nread, &copied);
|
||||
if(result) {
|
||||
failf(data, "error on copying HTTP Upgrade response: %d", result);
|
||||
failf(data, "error on copying HTTP Upgrade response: %d", (int)result);
|
||||
return CURLE_RECV_ERROR;
|
||||
}
|
||||
if(copied < nread) {
|
||||
|
|
|
|||
|
|
@ -154,7 +154,8 @@ static CURLcode httpchunk_readwrite(struct Curl_easy *data,
|
|||
if(ch->hexindex == 0) {
|
||||
/* This is illegal data, we received junk where we expected
|
||||
a hexadecimal digit. */
|
||||
failf(data, "chunk hex-length char not a hex digit: 0x%x", *buf);
|
||||
failf(data, "chunk hex-length char not a hex digit: 0x%x",
|
||||
(unsigned int)*buf);
|
||||
ch->state = CHUNK_FAILED;
|
||||
ch->last_code = CHUNKE_ILLEGAL_HEX;
|
||||
return CURLE_RECV_ERROR;
|
||||
|
|
@ -547,7 +548,7 @@ static CURLcode add_last_chunk(struct Curl_easy *data,
|
|||
out:
|
||||
curl_slist_free_all(trailers);
|
||||
CURL_TRC_READ(data, "http_chunk, added last chunk with trailers "
|
||||
"from client -> %d", result);
|
||||
"from client -> %d", (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -595,7 +596,7 @@ static CURLcode add_chunk(struct Curl_easy *data,
|
|||
if(!result)
|
||||
result = Curl_bufq_cwrite(&ctx->chunkbuf, "\r\n", 2, &n);
|
||||
CURL_TRC_READ(data, "http_chunk, made chunk of %zu bytes -> %d",
|
||||
nread, result);
|
||||
nread, (int)result);
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ static CURLcode imap_perform_upgrade_tls(struct Curl_easy *data,
|
|||
DEBUGASSERT(!imapc->ssldone);
|
||||
result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone);
|
||||
DEBUGF(infof(data, "imap_perform_upgrade_tls, connect -> %d, %d",
|
||||
result, ssldone));
|
||||
(int)result, ssldone));
|
||||
if(!result && ssldone) {
|
||||
imapc->ssldone = ssldone;
|
||||
/* perform CAPA now, changes imapc->state out of IMAP_UPGRADETLS */
|
||||
|
|
|
|||
|
|
@ -1909,7 +1909,7 @@ static CURLcode cr_mime_read(struct Curl_easy *data,
|
|||
/* Once we have errored, we will return the same error forever */
|
||||
if(ctx->errored) {
|
||||
CURL_TRC_READ(data, "cr_mime_read(len=%zu) is errored -> %d, eos=0",
|
||||
blen, ctx->error_result);
|
||||
blen, (int)ctx->error_result);
|
||||
*pnread = 0;
|
||||
*peos = FALSE;
|
||||
return ctx->error_result;
|
||||
|
|
@ -2026,8 +2026,8 @@ static CURLcode cr_mime_read(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
CURL_TRC_READ(data, "cr_mime_read(len=%zu, total=%" FMT_OFF_T
|
||||
", read=%" FMT_OFF_T ") -> %d, %zu, %d",
|
||||
blen, ctx->total_len, ctx->read_len, result, *pnread, *peos);
|
||||
", read=%" FMT_OFF_T ") -> %d, %zu, %d", blen,
|
||||
ctx->total_len, ctx->read_len, (int)result, *pnread, *peos);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ static CURLcode mqtt_verify_connack(struct Curl_easy *data)
|
|||
|
||||
if(ptr[0] != 0x00 || ptr[1] != 0x00) {
|
||||
failf(data, "Expected %02x%02x but got %02x%02x",
|
||||
0x00, 0x00, ptr[0], ptr[1]);
|
||||
0x00U, 0x00U, (unsigned char)ptr[0], (unsigned char)ptr[1]);
|
||||
curlx_dyn_reset(&mq->recvbuf);
|
||||
return CURLE_WEIRD_SERVER_REPLY;
|
||||
}
|
||||
|
|
@ -774,7 +774,7 @@ static CURLcode mqtt_do(struct Curl_easy *data, bool *done)
|
|||
|
||||
result = mqtt_connect(data);
|
||||
if(result) {
|
||||
failf(data, "Error %d sending MQTT CONNECT request", result);
|
||||
failf(data, "Error %d sending MQTT CONNECT request", (int)result);
|
||||
return result;
|
||||
}
|
||||
mqstate(data, MQTT_FIRST, MQTT_CONNACK);
|
||||
|
|
|
|||
|
|
@ -1204,7 +1204,8 @@ CURLMcode Curl_multi_pollset(struct Curl_easy *data,
|
|||
break;
|
||||
|
||||
default:
|
||||
failf(data, "multi_getsock: unexpected multi state %d", data->mstate);
|
||||
failf(data, "multi_getsock: unexpected multi state %d",
|
||||
(int)data->mstate);
|
||||
DEBUGASSERT(0);
|
||||
break;
|
||||
}
|
||||
|
|
@ -1213,7 +1214,7 @@ CURLMcode Curl_multi_pollset(struct Curl_easy *data,
|
|||
if(result) {
|
||||
if(result == CURLE_OUT_OF_MEMORY)
|
||||
return CURLM_OUT_OF_MEMORY;
|
||||
failf(data, "error determining pollset: %d", result);
|
||||
failf(data, "error determining pollset: %d", (int)result);
|
||||
return CURLM_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -2516,7 +2517,7 @@ static CURLMcode multistate_connecting(struct Curl_easy *data,
|
|||
}
|
||||
else if(*result) {
|
||||
/* failure detected */
|
||||
CURL_TRC_M(data, "connect failed -> %d", *result);
|
||||
CURL_TRC_M(data, "connect failed -> %d", (int)*result);
|
||||
multi_posttransfer(data);
|
||||
multi_done(data, *result, TRUE);
|
||||
*stream_error = TRUE;
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ CURLcode Curl_peer_from_url(CURLU *uh, struct Curl_easy *data,
|
|||
result = peer_create(&pp, ppeer);
|
||||
if(result)
|
||||
failf(data, "Error %d creating peer for %s:%u",
|
||||
result, pp.host_user.str, pp.port);
|
||||
(int)result, pp.host_user.str, pp.port);
|
||||
|
||||
out:
|
||||
peer_parse_clear(&pp);
|
||||
|
|
@ -522,10 +522,10 @@ CURLcode Curl_peer_from_connect_to(struct Curl_easy *data,
|
|||
#endif
|
||||
|
||||
result = peer_create(&pp, ppeer);
|
||||
CURL_TRC_M(data, "connect-to peer_create2 -> %d", result);
|
||||
CURL_TRC_M(data, "connect-to peer_create2 -> %d", (int)result);
|
||||
|
||||
out:
|
||||
CURL_TRC_M(data, "parse connect_to peer: %s -> %d", connect_to, result);
|
||||
CURL_TRC_M(data, "parse connect_to peer: %s -> %d", connect_to, (int)result);
|
||||
peer_parse_clear(&pp);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ static CURLcode pop3_perform_upgrade_tls(struct Curl_easy *data,
|
|||
DEBUGASSERT(!pop3c->ssldone);
|
||||
result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone);
|
||||
DEBUGF(infof(data, "pop3_perform_upgrade_tls, connect -> %d, %d",
|
||||
result, ssldone));
|
||||
(int)result, ssldone));
|
||||
if(!result && ssldone) {
|
||||
pop3c->ssldone = ssldone;
|
||||
/* perform CAPA now, changes pop3c->state out of POP3_UPGRADETLS */
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ static CURLcode req_flush(struct Curl_easy *data)
|
|||
result = Curl_xfer_send_shutdown(data, &done);
|
||||
if(result && data->req.shutdown_err_ignore) {
|
||||
infof(data, "Shutdown send direction error: %d. Broken server? "
|
||||
"Proceeding as if everything is ok.", result);
|
||||
"Proceeding as if everything is ok.", (int)result);
|
||||
result = CURLE_OK;
|
||||
done = TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -893,7 +893,7 @@ static CURLcode rtsp_rtp_write_resp(struct Curl_easy *data,
|
|||
* writer deal with it (it will report EXCESS and fail the transfer). */
|
||||
DEBUGF(infof(data, "rtsp_rtp_write_resp(len=%zu, in_header=%d, done=%d, "
|
||||
"rtspc->state=%d, req.size=%" FMT_OFF_T ")",
|
||||
blen, rtspc->in_header, data->req.done, rtspc->state,
|
||||
blen, rtspc->in_header, data->req.done, (int)rtspc->state,
|
||||
data->req.size));
|
||||
if(!result && (is_eos || blen)) {
|
||||
result = Curl_client_write(data, CLIENTWRITE_BODY |
|
||||
|
|
|
|||
22
lib/sendf.c
22
lib/sendf.c
|
|
@ -103,7 +103,7 @@ CURLcode Curl_client_start(struct Curl_easy *data)
|
|||
result = r->crt->cntrl(data, r, CURL_CRCNTRL_REWIND);
|
||||
if(result) {
|
||||
failf(data, "rewind of client reader '%s' failed: %d",
|
||||
r->crt->name, result);
|
||||
r->crt->name, (int)result);
|
||||
return result;
|
||||
}
|
||||
r = r->next;
|
||||
|
|
@ -194,7 +194,7 @@ static CURLcode cw_download_write(struct Curl_easy *data,
|
|||
return CURLE_OK;
|
||||
result = Curl_cwriter_write(data, writer->next, type, buf, nbytes);
|
||||
CURL_TRC_WRITE(data, "download_write header(type=%x, blen=%zu) -> %d",
|
||||
type, nbytes, result);
|
||||
(unsigned int)type, nbytes, (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ static CURLcode cw_download_write(struct Curl_easy *data,
|
|||
/* BODY arrives although we want none, bail out */
|
||||
streamclose(data->conn, "ignoring body");
|
||||
CURL_TRC_WRITE(data, "download_write body(type=%x, blen=%zu), "
|
||||
"did not want a BODY", type, nbytes);
|
||||
"did not want a BODY", (unsigned int)type, nbytes);
|
||||
data->req.download_done = TRUE;
|
||||
if(data->info.header_size)
|
||||
/* if headers have been received, this is fine */
|
||||
|
|
@ -259,7 +259,7 @@ static CURLcode cw_download_write(struct Curl_easy *data,
|
|||
if(!data->req.ignorebody && (nwrite || (type & CLIENTWRITE_EOS))) {
|
||||
result = Curl_cwriter_write(data, writer->next, type, buf, nwrite);
|
||||
CURL_TRC_WRITE(data, "download_write body(type=%x, blen=%zu) -> %d",
|
||||
type, nbytes, result);
|
||||
(unsigned int)type, nbytes, (int)result);
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
|
|
@ -397,7 +397,7 @@ CURLcode Curl_client_write(struct Curl_easy *data, int type, const char *buf,
|
|||
|
||||
result = Curl_cwriter_write(data, data->req.writer_stack, type, buf, len);
|
||||
CURL_TRC_WRITE(data, "client_write(type=%x, len=%zu) -> %d",
|
||||
type, len, result);
|
||||
(unsigned int)type, len, (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -732,7 +732,7 @@ static CURLcode cr_in_read(struct Curl_easy *data,
|
|||
}
|
||||
CURL_TRC_READ(data, "cr_in_read(len=%zu, total=%" FMT_OFF_T
|
||||
", read=%" FMT_OFF_T ") -> %d, nread=%zu, eos=%d",
|
||||
blen, ctx->total_len, ctx->read_len, result,
|
||||
blen, ctx->total_len, ctx->read_len, (int)result,
|
||||
*pnread, *peos);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1055,7 +1055,7 @@ static CURLcode cr_lc_read(struct Curl_easy *data,
|
|||
|
||||
out:
|
||||
CURL_TRC_READ(data, "cr_lc_read(len=%zu) -> %d, nread=%zu, eos=%d",
|
||||
blen, result, *pnread, *peos);
|
||||
blen, (int)result, *pnread, *peos);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1140,7 +1140,7 @@ CURLcode Curl_creader_set_fread(struct Curl_easy *data, curl_off_t len)
|
|||
result = do_init_reader_stack(data, r);
|
||||
out:
|
||||
CURL_TRC_READ(data, "add fread reader, len=%" FMT_OFF_T " -> %d",
|
||||
len, result);
|
||||
len, (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1218,7 +1218,7 @@ CURLcode Curl_client_read(struct Curl_easy *data, char *buf, size_t blen,
|
|||
|
||||
out:
|
||||
CURL_TRC_READ(data, "client_read(len=%zu) -> %d, nread=%zu, eos=%d",
|
||||
blen, result, *nread, *eos);
|
||||
blen, (int)result, *nread, *eos);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1404,7 +1404,7 @@ CURLcode Curl_creader_set_buf(struct Curl_easy *data,
|
|||
cl_reset_reader(data);
|
||||
result = do_init_reader_stack(data, r);
|
||||
out:
|
||||
CURL_TRC_READ(data, "add buf reader, len=%zu -> %d", blen, result);
|
||||
CURL_TRC_READ(data, "add buf reader, len=%zu -> %d", blen, (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1437,7 +1437,7 @@ CURLcode Curl_creader_unpause(struct Curl_easy *data)
|
|||
|
||||
while(reader) {
|
||||
result = reader->crt->cntrl(data, reader, CURL_CRCNTRL_UNPAUSE);
|
||||
CURL_TRC_READ(data, "unpausing %s -> %d", reader->crt->name, result);
|
||||
CURL_TRC_READ(data, "unpausing %s -> %d", reader->crt->name, (int)result);
|
||||
if(result)
|
||||
break;
|
||||
reader = reader->next;
|
||||
|
|
|
|||
|
|
@ -802,7 +802,7 @@ static CURLcode setopt_long_bool(struct Curl_easy *data, CURLoption option,
|
|||
if((arg > ok) || (arg < 0))
|
||||
/* reserve other values for future use */
|
||||
infof(data, "boolean setopt(%d) got unsupported argument %ld,"
|
||||
" treated as %d", option, arg, enabled);
|
||||
" treated as %d", (int)option, arg, enabled);
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
|
@ -2947,6 +2947,6 @@ CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...)
|
|||
|
||||
va_end(arg);
|
||||
if(result == CURLE_BAD_FUNCTION_ARGUMENT)
|
||||
failf(data, "setopt 0x%x got bad argument", option);
|
||||
failf(data, "setopt 0x%x got bad argument", (unsigned int)option);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
19
lib/smtp.c
19
lib/smtp.c
|
|
@ -347,7 +347,7 @@ static CURLcode cr_eob_read(struct Curl_easy *data,
|
|||
/* Get more and convert it when needed */
|
||||
result = Curl_creader_read(data, reader->next, buf, blen, &nread, &eos);
|
||||
CURL_TRC_SMTP(data, "cr_eob_read, next_read(len=%zu) -> %d, %zu eos=%d",
|
||||
blen, result, nread, eos);
|
||||
blen, (int)result, nread, eos);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
|
|
@ -432,7 +432,7 @@ static CURLcode cr_eob_read(struct Curl_easy *data,
|
|||
}
|
||||
*peos = (bool)ctx->eos;
|
||||
DEBUGF(infof(data, "cr_eob_read(%zu) -> %d, %zu, %d",
|
||||
blen, result, *pnread, *peos));
|
||||
blen, (int)result, *pnread, *peos));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -700,7 +700,7 @@ static CURLcode smtp_perform_upgrade_tls(struct Curl_easy *data,
|
|||
DEBUGASSERT(!smtpc->ssldone);
|
||||
result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone);
|
||||
DEBUGF(infof(data, "smtp_perform_upgrade_tls, connect -> %d, %d",
|
||||
result, ssldone));
|
||||
(int)result, ssldone));
|
||||
if(!result && ssldone) {
|
||||
smtpc->ssldone = ssldone;
|
||||
/* perform EHLO now, changes smtp->state out of SMTP_UPGRADETLS */
|
||||
|
|
@ -1743,7 +1743,7 @@ static CURLcode smtp_done(struct Curl_easy *data, CURLcode status,
|
|||
/* Clear the transfer mode for the next request */
|
||||
smtp->transfer = PPTRANSFER_BODY;
|
||||
CURL_TRC_SMTP(data, "smtp_done(status=%d, premature=%d) -> %d",
|
||||
status, premature, result);
|
||||
(int)status, premature, (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1804,7 +1804,7 @@ static CURLcode smtp_perform(struct Curl_easy *data,
|
|||
|
||||
out:
|
||||
CURL_TRC_SMTP(data, "smtp_perform() -> %d, connected=%d, done=%d",
|
||||
result, *connected, *dophase_done);
|
||||
(int)result, *connected, *dophase_done);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1853,7 +1853,7 @@ static CURLcode smtp_regular_transfer(struct Curl_easy *data,
|
|||
result = smtp_dophase_done(data, smtp, connected);
|
||||
|
||||
CURL_TRC_SMTP(data, "smtp_regular_transfer() -> %d, done=%d",
|
||||
result, *dophase_done);
|
||||
(int)result, *dophase_done);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1885,7 +1885,7 @@ static CURLcode smtp_do(struct Curl_easy *data, bool *done)
|
|||
return result;
|
||||
|
||||
result = smtp_regular_transfer(data, smtpc, smtp, done);
|
||||
CURL_TRC_SMTP(data, "smtp_do() -> %d, done=%d", result, *done);
|
||||
CURL_TRC_SMTP(data, "smtp_do() -> %d, done=%d", (int)result, *done);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1936,7 +1936,8 @@ static CURLcode smtp_doing(struct Curl_easy *data, bool *dophase_done)
|
|||
DEBUGF(infof(data, "DO phase is complete"));
|
||||
}
|
||||
|
||||
CURL_TRC_SMTP(data, "smtp_doing() -> %d, done=%d", result, *dophase_done);
|
||||
CURL_TRC_SMTP(data, "smtp_doing() -> %d, done=%d", (int)result,
|
||||
*dophase_done);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1978,7 +1979,7 @@ static CURLcode smtp_setup_connection(struct Curl_easy *data,
|
|||
result = CURLE_OUT_OF_MEMORY;
|
||||
|
||||
out:
|
||||
CURL_TRC_SMTP(data, "smtp_setup_connection() -> %d", result);
|
||||
CURL_TRC_SMTP(data, "smtp_setup_connection() -> %d", (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1277,11 +1277,11 @@ static CURLcode socks_cf_adjust_pollset(struct Curl_cfilter *cf,
|
|||
case SOCKS5_ST_REQ0_SEND:
|
||||
case SOCKS5_ST_AUTH_SEND:
|
||||
case SOCKS5_ST_REQ1_SEND:
|
||||
CURL_TRC_CF(data, cf, "adjust pollset out (%d)", sx->state);
|
||||
CURL_TRC_CF(data, cf, "adjust pollset out (%d)", (int)sx->state);
|
||||
result = Curl_pollset_set_out_only(data, ps, sock);
|
||||
break;
|
||||
default:
|
||||
CURL_TRC_CF(data, cf, "adjust pollset in (%d)", sx->state);
|
||||
CURL_TRC_CF(data, cf, "adjust pollset in (%d)", (int)sx->state);
|
||||
result = Curl_pollset_set_in_only(data, ps, sock);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -647,14 +647,15 @@ const char *Curl_sspi_strerror(SECURITY_STATUS err, char *buf, size_t buflen)
|
|||
"SEC_E_ILLEGAL_MESSAGE (0x%08lx) - This error usually "
|
||||
"occurs when a fatal SSL/TLS alert is received (e.g. "
|
||||
"handshake failed). More detail may be available in "
|
||||
"the Windows System event log.", err);
|
||||
"the Windows System event log.", (unsigned long)err);
|
||||
}
|
||||
else {
|
||||
char msgbuf[256];
|
||||
if(curlx_get_winapi_error((DWORD)err, msgbuf, sizeof(msgbuf)))
|
||||
curl_msnprintf(buf, buflen, "%s (0x%08lx) - %s", txt, err, msgbuf);
|
||||
curl_msnprintf(buf, buflen, "%s (0x%08lx) - %s", txt, (unsigned long)err,
|
||||
msgbuf);
|
||||
else
|
||||
curl_msnprintf(buf, buflen, "%s (0x%08lx)", txt, err);
|
||||
curl_msnprintf(buf, buflen, "%s (0x%08lx)", txt, (unsigned long)err);
|
||||
}
|
||||
#else /* CURLVERBOSE */
|
||||
if(err == SEC_E_OK)
|
||||
|
|
|
|||
|
|
@ -874,7 +874,7 @@ static CURLcode tftp_state_machine(struct tftp_conn *state,
|
|||
infof(data, "%s", "TFTP finished");
|
||||
break;
|
||||
default:
|
||||
DEBUGF(infof(data, "STATE: %d", state->state));
|
||||
DEBUGF(infof(data, "STATE: %d", (int)state->state));
|
||||
failf(data, "%s", "Internal state machine error");
|
||||
result = CURLE_TFTP_ILLEGAL;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ static CURLcode sendrecv_dl(struct Curl_easy *data,
|
|||
out:
|
||||
Curl_multi_xfer_buf_release(data, xfer_buf);
|
||||
if(result)
|
||||
DEBUGF(infof(data, "sendrecv_dl() -> %d", result));
|
||||
DEBUGF(infof(data, "sendrecv_dl() -> %d", (int)result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -425,7 +425,7 @@ CURLcode Curl_sendrecv(struct Curl_easy *data)
|
|||
|
||||
out:
|
||||
if(result)
|
||||
DEBUGF(infof(data, "Curl_sendrecv() -> %d", result));
|
||||
DEBUGF(infof(data, "Curl_sendrecv() -> %d", (int)result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -777,7 +777,7 @@ CURLcode Curl_xfer_write_resp(struct Curl_easy *data,
|
|||
data->req.download_done = TRUE;
|
||||
}
|
||||
CURL_TRC_WRITE(data, "xfer_write_resp(len=%zu, eos=%d) -> %d",
|
||||
blen, is_eos, result);
|
||||
blen, is_eos, (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -834,7 +834,7 @@ CURLcode Curl_xfer_send(struct Curl_easy *data,
|
|||
data->info.request_size += *pnwritten;
|
||||
|
||||
DEBUGF(infof(data, "Curl_xfer_send(len=%zu, eos=%d) -> %d, %zu",
|
||||
blen, eos, result, *pnwritten));
|
||||
blen, eos, (int)result, *pnwritten));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2982,7 +2982,7 @@ CURLcode Curl_connect(struct Curl_easy *data, bool *pconnected)
|
|||
result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
|
||||
if(!result)
|
||||
result = Curl_headers_init(data);
|
||||
CURL_TRC_M(data, "Curl_conn_setup() -> %d", result);
|
||||
CURL_TRC_M(data, "Curl_conn_setup() -> %d", (int)result);
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -844,7 +844,8 @@ static CURLcode auth_create_digest_http_message(
|
|||
|
||||
if(digest->qop)
|
||||
hashthis = curl_maprintf("%s:%s:%08x:%s:%s:%s", ha1, digest->nonce,
|
||||
digest->nc, digest->cnonce, digest->qop, ha2);
|
||||
(unsigned int)digest->nc, digest->cnonce,
|
||||
digest->qop, ha2);
|
||||
else
|
||||
hashthis = curl_maprintf("%s:%s:%s", ha1, digest->nonce, ha2);
|
||||
|
||||
|
|
@ -909,7 +910,7 @@ static CURLcode auth_create_digest_http_message(
|
|||
nonce_quoted,
|
||||
uri_quoted,
|
||||
digest->cnonce,
|
||||
digest->nc,
|
||||
(unsigned int)digest->nc,
|
||||
digest->qop,
|
||||
request_digest);
|
||||
|
||||
|
|
|
|||
|
|
@ -456,7 +456,8 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data,
|
|||
if(status == SEC_E_OK)
|
||||
output_token_len = chlg_buf[4].cbBuffer;
|
||||
else { /* delete the context so a new one can be made */
|
||||
infof(data, "digest_sspi: MakeSignature failed, error 0x%08lx", status);
|
||||
infof(data, "digest_sspi: MakeSignature failed, error 0x%08lx",
|
||||
(unsigned long)status);
|
||||
Curl_pSecFn->DeleteSecurityContext(digest->http_context);
|
||||
curlx_safefree(digest->http_context);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
|
|||
&attrs, NULL);
|
||||
if(status != SEC_E_OK) {
|
||||
infof(data, "NTLM handshake failure (type-3 message): Status=0x%08lx",
|
||||
status);
|
||||
(unsigned long)status);
|
||||
|
||||
if(status == SEC_E_INSUFFICIENT_MEMORY)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
|
|
|||
|
|
@ -1104,7 +1104,7 @@ out:
|
|||
result = CURLE_COULDNT_CONNECT;
|
||||
if(cerr) {
|
||||
CURL_TRC_CF(data, cf, "connect error, type=%d, code=%" PRIu64,
|
||||
cerr->type, cerr->error_code);
|
||||
(int)cerr->type, cerr->error_code);
|
||||
switch(cerr->type) {
|
||||
case NGTCP2_CCERR_TYPE_VERSION_NEGOTIATION:
|
||||
CURL_TRC_CF(data, cf, "error in version negotiation");
|
||||
|
|
@ -1141,7 +1141,7 @@ out:
|
|||
result = Curl_cf_ngtcp2_cmn_set_expiry(cf, data, &pktx);
|
||||
}
|
||||
if(result || *done)
|
||||
CURL_TRC_CF(data, cf, "connect -> %d, done=%d", result, *done);
|
||||
CURL_TRC_CF(data, cf, "connect -> %d, done=%d", (int)result, *done);
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1182,7 +1182,8 @@ CURLcode Curl_cf_ngtcp2_cmn_shutdown(struct Curl_cfilter *cf,
|
|||
goto out;
|
||||
}
|
||||
else if(result) {
|
||||
CURL_TRC_CF(data, cf, "shutdown, error %d flushing sendbuf", result);
|
||||
CURL_TRC_CF(data, cf, "shutdown, error %d flushing sendbuf",
|
||||
(int)result);
|
||||
*done = TRUE;
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -1196,7 +1197,7 @@ CURLcode Curl_cf_ngtcp2_cmn_shutdown(struct Curl_cfilter *cf,
|
|||
(uint8_t *)buffer, sizeof(buffer),
|
||||
&ctx->last_error, pktx.ts);
|
||||
CURL_TRC_CF(data, cf, "start shutdown(err_type=%d, err_code=%"
|
||||
PRIu64 ") -> %zd", ctx->last_error.type,
|
||||
PRIu64 ") -> %zd", (int)ctx->last_error.type,
|
||||
ctx->last_error.error_code, (ssize_t)nwritten);
|
||||
/* there are cases listed in ngtcp2 documentation where this call
|
||||
* may fail. Since we are doing a connection shutdown as graceful
|
||||
|
|
@ -1210,7 +1211,7 @@ CURLcode Curl_cf_ngtcp2_cmn_shutdown(struct Curl_cfilter *cf,
|
|||
(size_t)nwritten, &n);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "error %d adding shutdown packets to sendbuf, "
|
||||
"aborting shutdown", result);
|
||||
"aborting shutdown", (int)result);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
@ -1229,7 +1230,8 @@ CURLcode Curl_cf_ngtcp2_cmn_shutdown(struct Curl_cfilter *cf,
|
|||
goto out;
|
||||
}
|
||||
else if(result) {
|
||||
CURL_TRC_CF(data, cf, "shutdown, error %d flushing sendbuf", result);
|
||||
CURL_TRC_CF(data, cf, "shutdown, error %d flushing sendbuf",
|
||||
(int)result);
|
||||
*done = TRUE;
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -1591,7 +1593,7 @@ static CURLcode cf_ngtcp2_recv_pkts(const unsigned char *buf, size_t buflen,
|
|||
|
||||
if(ecn)
|
||||
CURL_TRC_CF(pktx->data, pktx->cf, "vquic_recv(len=%zu, gso=%zu, ecn=%x)",
|
||||
buflen, gso_size, ecn);
|
||||
buflen, gso_size, (unsigned int)ecn);
|
||||
ngtcp2_addr_init(&path.local, (struct sockaddr *)&ctx->q.local_addr,
|
||||
ctx->q.local_addrlen);
|
||||
ngtcp2_addr_init(&path.remote, (struct sockaddr *)remote_addr,
|
||||
|
|
@ -1681,7 +1683,8 @@ CURLcode Curl_cf_ngtcp2_progress_ingress(struct Curl_cfilter *cf,
|
|||
return CURLE_OK;
|
||||
}
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "ingress, recv from tunnel failed: %d", result);
|
||||
CURL_TRC_CF(data, cf, "ingress, recv from tunnel failed: %d",
|
||||
(int)result);
|
||||
return result;
|
||||
}
|
||||
if(nread == 0) {
|
||||
|
|
@ -1856,7 +1859,7 @@ void Curl_cf_ngtcp2_h3_stream_close(struct Curl_cfilter *cf,
|
|||
result = Curl_cf_ngtcp2_progress_egress(cf, data, NULL);
|
||||
if(result)
|
||||
CURL_TRC_CF(data, cf, "[%" PRId64 "] cancel stream -> %d",
|
||||
stream->id, result);
|
||||
stream->id, (int)result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1914,7 +1917,7 @@ bool Curl_cf_ngtcp2_cmn_conn_is_alive(struct Curl_cfilter *cf,
|
|||
only "protocol frames" */
|
||||
*input_pending = FALSE;
|
||||
result = Curl_cf_ngtcp2_progress_ingress(cf, data, NULL);
|
||||
CURL_TRC_CF(data, cf, "is_alive, progress ingress -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "is_alive, progress ingress -> %d", (int)result);
|
||||
alive = result ? FALSE : TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -774,7 +774,7 @@ static CURLcode cf_h3_proxy_send(struct Curl_cfilter *cf,
|
|||
result = cf_h3_proxy_sendbuf_add(data, stream, buf, len, pnwritten);
|
||||
CURL_TRC_CF(data, cf, "[%" PRId64 "] cf_send, add to "
|
||||
"sendbuf(len=%zu) -> %d, %zu",
|
||||
stream->id, len, result, *pnwritten);
|
||||
stream->id, len, (int)result, *pnwritten);
|
||||
if(result)
|
||||
goto out;
|
||||
(void)nghttp3_conn_resume_stream(ctx->h3conn, stream->id);
|
||||
|
|
@ -791,7 +791,7 @@ out:
|
|||
Curl_cf_ngtcp2_cmn_set_expiry(cf, data, &pktx));
|
||||
denied:
|
||||
CURL_TRC_CF(data, cf, "[%" PRId64 "] cf_send(len=%zu) -> %d, %zu",
|
||||
stream ? stream->id : -1, len, result, *pnwritten);
|
||||
stream ? stream->id : -1, len, (int)result, *pnwritten);
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -843,7 +843,7 @@ static CURLcode cf_h3_proxy_recv(struct Curl_cfilter *cf,
|
|||
result = Curl_bufq_cread(&pctx->tunnel.recvbuf, buf, len, pnread);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "[%" PRId64 "] read inbufq(len=%zu) -> %zu, %d",
|
||||
stream->id, len, *pnread, result);
|
||||
stream->id, len, *pnread, (int)result);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
|
@ -875,7 +875,7 @@ out:
|
|||
Curl_cf_ngtcp2_cmn_set_expiry(cf, data, &pktx));
|
||||
denied:
|
||||
CURL_TRC_CF(data, cf, "[%" PRId64 "] cf_recv(len=%zu) -> %d, %zu",
|
||||
stream ? stream->id : -1, len, result, *pnread);
|
||||
stream ? stream->id : -1, len, (int)result, *pnread);
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,8 @@ static void h3_xfer_write_resp_hd(struct Curl_cfilter *cf,
|
|||
stream->xfer_result = Curl_xfer_write_resp_hd(data, buf, buflen, eos);
|
||||
if(stream->xfer_result)
|
||||
CURL_TRC_CF(data, cf, "[%" PRId64 "] error %d writing %zu "
|
||||
"bytes of headers", stream->id, stream->xfer_result, buflen);
|
||||
"bytes of headers", stream->id, (int)stream->xfer_result,
|
||||
buflen);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +155,7 @@ static void h3_xfer_write_resp(struct Curl_cfilter *cf,
|
|||
/* If the transfer write is errored, we do not want any more data */
|
||||
if(stream->xfer_result) {
|
||||
CURL_TRC_CF(data, cf, "[%" PRId64 "] error %d writing %zu bytes of data",
|
||||
stream->id, stream->xfer_result, buflen);
|
||||
stream->id, (int)stream->xfer_result, buflen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -545,7 +546,7 @@ out:
|
|||
result = ctx->tls_vrfy_result;
|
||||
denied:
|
||||
CURL_TRC_CF(data, cf, "[%" PRId64 "] cf_recv(buflen=%zu) -> %d, %zu",
|
||||
stream ? stream->id : -1, buflen, result, *pnread);
|
||||
stream ? stream->id : -1, buflen, (int)result, *pnread);
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -817,7 +818,7 @@ static CURLcode cf_ngtcp2_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
}
|
||||
result = h3_stream_open(cf, data, buf, len, pnwritten);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "failed to open stream -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "failed to open stream -> %d", (int)result);
|
||||
goto out;
|
||||
}
|
||||
VERBOSE(stream = H3_STREAM_CTX(ctx, data));
|
||||
|
|
@ -855,7 +856,7 @@ static CURLcode cf_ngtcp2_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
result = Curl_bufq_write(&stream->sendbuf, buf, len, pnwritten);
|
||||
CURL_TRC_CF(data, cf, "[%" PRId64 "] cf_send, add to "
|
||||
"sendbuf(len=%zu) -> %d, %zu",
|
||||
stream->id, len, result, *pnwritten);
|
||||
stream->id, len, (int)result, *pnwritten);
|
||||
if(result)
|
||||
goto out;
|
||||
(void)nghttp3_conn_resume_stream(ctx->h3conn, stream->id);
|
||||
|
|
@ -874,7 +875,7 @@ out:
|
|||
result = ctx->tls_vrfy_result;
|
||||
denied:
|
||||
CURL_TRC_CF(data, cf, "[%" PRId64 "] cf_send(len=%zu) -> %d, %zu",
|
||||
stream ? stream->id : -1, len, result, *pnwritten);
|
||||
stream ? stream->id : -1, len, (int)result, *pnwritten);
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ static void cf_quiche_stream_close(struct Curl_cfilter *cf,
|
|||
result = cf_flush_egress(cf, data);
|
||||
if(result)
|
||||
CURL_TRC_CF(data, cf, "[%" PRIu64 "] stream close, flush egress -> %d",
|
||||
stream->id, result);
|
||||
stream->id, (int)result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -343,7 +343,8 @@ static void cf_quiche_write_hd(struct Curl_cfilter *cf,
|
|||
stream->xfer_result = Curl_xfer_write_resp_hd(data, buf, blen, eos);
|
||||
if(stream->xfer_result)
|
||||
CURL_TRC_CF(data, cf, "[%" PRIu64 "] error %d writing %zu "
|
||||
"bytes of headers", stream->id, stream->xfer_result, blen);
|
||||
"bytes of headers", stream->id, (int)stream->xfer_result,
|
||||
blen);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -423,7 +424,7 @@ static int cb_each_header(uint8_t *name, size_t name_len,
|
|||
|
||||
if(result) {
|
||||
CURL_TRC_CF(x->data, x->cf, "[%" PRIu64 "] on header error %d",
|
||||
stream->id, result);
|
||||
stream->id, (int)result);
|
||||
if(!stream->xfer_result)
|
||||
stream->xfer_result = result;
|
||||
}
|
||||
|
|
@ -464,7 +465,7 @@ static void cf_quiche_flush_body(struct Curl_cfilter *cf,
|
|||
Curl_bufq_skip(&ctx->writebuf, blen);
|
||||
if(stream->xfer_result) {
|
||||
CURL_TRC_CF(data, cf, "[%" PRIu64 "] error %d writing %zu bytes"
|
||||
" of data", stream->id, stream->xfer_result, blen);
|
||||
" of data", stream->id, (int)stream->xfer_result, blen);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -501,9 +502,9 @@ static void cf_quiche_recv_body(struct Curl_cfilter *cf,
|
|||
break;
|
||||
else if(result) {
|
||||
CURL_TRC_CF(data, cf, "[%" PRIu64 "] recv_body error %d",
|
||||
stream->id, result);
|
||||
stream->id, (int)result);
|
||||
failf(data, "[%" PRIu64 "] Error %d in HTTP/3 response body for stream",
|
||||
stream->id, result);
|
||||
stream->id, (int)result);
|
||||
stream->closed = TRUE;
|
||||
stream->reset = TRUE;
|
||||
stream->send_closed = TRUE;
|
||||
|
|
@ -519,10 +520,14 @@ static void cf_quiche_process_ev(struct Curl_cfilter *cf,
|
|||
struct h3_stream_ctx *stream,
|
||||
quiche_h3_event *ev)
|
||||
{
|
||||
enum quiche_h3_event_type type;
|
||||
|
||||
if(!stream)
|
||||
return;
|
||||
|
||||
switch(quiche_h3_event_type(ev)) {
|
||||
type = quiche_h3_event_type(ev);
|
||||
|
||||
switch(type) {
|
||||
case QUICHE_H3_EVENT_HEADERS: {
|
||||
struct cb_ctx cb_ctx;
|
||||
stream->resp_got_header = TRUE;
|
||||
|
|
@ -568,7 +573,7 @@ static void cf_quiche_process_ev(struct Curl_cfilter *cf,
|
|||
|
||||
default:
|
||||
CURL_TRC_CF(data, cf, "[%" PRIu64 "] recv, unhandled event %d",
|
||||
stream->id, quiche_h3_event_type(ev));
|
||||
stream->id, (int)type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -876,7 +881,7 @@ static CURLcode recv_closed_stream(struct Curl_cfilter *cf,
|
|||
vquic_h3_err_str(stream->error3));
|
||||
result = data->req.bytecount ? CURLE_PARTIAL_FILE : CURLE_HTTP3;
|
||||
CURL_TRC_CF(data, cf, "[%" PRIu64 "] cf_recv, was reset -> %d",
|
||||
stream->id, result);
|
||||
stream->id, (int)result);
|
||||
}
|
||||
else if(!stream->resp_got_header) {
|
||||
failf(data, "HTTP/3 stream %" PRIu64 " was closed cleanly, but before "
|
||||
|
|
@ -927,7 +932,8 @@ out:
|
|||
if(*pnread > 0)
|
||||
ctx->data_recvd += *pnread;
|
||||
CURL_TRC_CF(data, cf, "[%" PRIu64 "] cf_recv(len=%zu) -> %d, %zu, total=%"
|
||||
FMT_OFF_T, stream->id, blen, result, *pnread, ctx->data_recvd);
|
||||
FMT_OFF_T, stream->id, blen, (int)result, *pnread,
|
||||
ctx->data_recvd);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1153,7 +1159,7 @@ out:
|
|||
|
||||
CURL_TRC_CF(data, cf, "[%" PRIu64 "] cf_send(len=%zu) -> %d, %zu",
|
||||
stream ? stream->id : (uint64_t)~0, len,
|
||||
result, *pnwritten);
|
||||
(int)result, *pnwritten);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1237,7 +1243,7 @@ static CURLcode cf_quiche_cntrl(struct Curl_cfilter *cf,
|
|||
body[0] = 'X';
|
||||
result = cf_quiche_send(cf, data, body, 0, TRUE, &sent);
|
||||
CURL_TRC_CF(data, cf, "[%" PRIu64 "] DONE_SEND -> %d, %zu",
|
||||
stream->id, result, sent);
|
||||
stream->id, (int)result, sent);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ static CURLcode send_packet_no_gso(struct Curl_cfilter *cf,
|
|||
out:
|
||||
CURL_TRC_CF(data, cf,
|
||||
"vquic_%s(len=%zu, gso=%zu, calls=%zu) -> %d, sent=%zu",
|
||||
VQUIC_SEND_METHOD, pktlen, gsolen, calls, result, *psent);
|
||||
VQUIC_SEND_METHOD, pktlen, gsolen, calls, (int)result, *psent);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -297,7 +297,7 @@ static CURLcode send_packet_no_gso_cf(struct Curl_cfilter *cf,
|
|||
out:
|
||||
CURL_TRC_CF(data, cf,
|
||||
"vquic_cf_send(len=%zu, gso=%zu, calls=%zu) -> %d, sent=%zu",
|
||||
pktlen, gsolen, calls, result, *psent);
|
||||
pktlen, gsolen, calls, (int)result, *psent);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -327,7 +327,7 @@ static CURLcode vquic_send_packets(struct Curl_cfilter *cf,
|
|||
result = do_sendmsg(cf, data, qctx, pkt, pktlen, gsolen, psent);
|
||||
CURL_TRC_CF(data, cf,
|
||||
"vquic_%s(len=%zu, gso=%zu, calls=1) -> %d, sent=%zu",
|
||||
VQUIC_SEND_METHOD, pktlen, gsolen, result, *psent);
|
||||
VQUIC_SEND_METHOD, pktlen, gsolen, (int)result, *psent);
|
||||
}
|
||||
if(!result)
|
||||
qctx->last_io = qctx->last_op;
|
||||
|
|
@ -532,7 +532,7 @@ out:
|
|||
if(total_nread || result)
|
||||
CURL_TRC_CF(data, cf,
|
||||
"vquic_recvmmsg(len=%zu, packets=%zu, calls=%zu) -> %d",
|
||||
total_nread, pkts, calls, result);
|
||||
total_nread, pkts, calls, (int)result);
|
||||
Curl_multi_xfer_sockbuf_release(data, sockbuf);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -616,7 +616,7 @@ out:
|
|||
if(total_nread || result)
|
||||
CURL_TRC_CF(data, cf,
|
||||
"vquic_recvmsg(len=%zu, packets=%zu, calls=%zu) -> %d",
|
||||
total_nread, pkts, calls, result);
|
||||
total_nread, pkts, calls, (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -681,7 +681,7 @@ out:
|
|||
if(total_nread || result)
|
||||
CURL_TRC_CF(data, cf,
|
||||
"vquic_recvfrom(len=%zu, packets=%zu, calls=%zu) -> %d",
|
||||
total_nread, pkts, calls, result);
|
||||
total_nread, pkts, calls, (int)result);
|
||||
return result;
|
||||
}
|
||||
#endif /* !HAVE_SENDMMSG && !HAVE_SENDMSG */
|
||||
|
|
|
|||
|
|
@ -2444,7 +2444,7 @@ static CURLcode myssh_statemachine(struct Curl_easy *data,
|
|||
if(!result && (sshc->state == SSH_STOP))
|
||||
result = sshc->actualcode;
|
||||
CURL_TRC_SSH(data, "[%s] statemachine() -> %d, block=%d",
|
||||
Curl_ssh_statename(sshc->state), result, *block);
|
||||
Curl_ssh_statename(sshc->state), (int)result, *block);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -2469,7 +2469,7 @@ static CURLcode myssh_pollset(struct Curl_easy *data,
|
|||
if(waitfor & REQ_IO_SEND)
|
||||
flags |= CURL_POLL_OUT;
|
||||
DEBUGASSERT(flags);
|
||||
CURL_TRC_SSH(data, "pollset, flags=%x", flags);
|
||||
CURL_TRC_SSH(data, "pollset, flags=%x", (unsigned int)flags);
|
||||
return Curl_pollset_change(data, ps, sock, flags, 0);
|
||||
}
|
||||
/* While we still have a session, we listen incoming data. */
|
||||
|
|
|
|||
|
|
@ -3183,7 +3183,7 @@ static CURLcode ssh_statemachine(struct Curl_easy *data,
|
|||
result = CURLE_OK;
|
||||
}
|
||||
CURL_TRC_SSH(data, "[%s] statemachine() -> %d, block=%d",
|
||||
Curl_ssh_statename(sshc->state), result, *block);
|
||||
Curl_ssh_statename(sshc->state), (int)result, *block);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -3209,7 +3209,7 @@ static CURLcode ssh_pollset(struct Curl_easy *data,
|
|||
if(waitfor & REQ_IO_SEND)
|
||||
flags |= CURL_POLL_OUT;
|
||||
DEBUGASSERT(flags);
|
||||
CURL_TRC_SSH(data, "pollset, flags=%x", flags);
|
||||
CURL_TRC_SSH(data, "pollset, flags=%x", (unsigned int)flags);
|
||||
return Curl_pollset_change(data, ps, sock, flags, 0);
|
||||
}
|
||||
/* While we still have a session, we listen incoming data. */
|
||||
|
|
@ -3844,7 +3844,7 @@ static CURLcode sftp_disconnect(struct Curl_easy *data,
|
|||
CURL_TRC_SSH(data, "DISCONNECT starts now");
|
||||
myssh_to(data, sshc, SSH_SFTP_SHUTDOWN);
|
||||
result = ssh_block_statemach(data, sshc, sshp, TRUE);
|
||||
CURL_TRC_SSH(data, "DISCONNECT is done -> %d", result);
|
||||
CURL_TRC_SSH(data, "DISCONNECT is done -> %d", (int)result);
|
||||
}
|
||||
sshc_cleanup(sshc, data, TRUE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ static ssize_t gtls_push(void *s, const void *buf, size_t blen)
|
|||
DEBUGASSERT(data);
|
||||
result = Curl_conn_cf_send(cf->next, data, buf, blen, FALSE, &nwritten);
|
||||
CURL_TRC_CF(data, cf, "gtls_push(len=%zu) -> %d, %zu",
|
||||
blen, result, nwritten);
|
||||
blen, (int)result, nwritten);
|
||||
backend->gtls.io_result = result;
|
||||
if(result) {
|
||||
/* !checksrc! disable ERRNOVAR 1 */
|
||||
|
|
@ -128,7 +128,8 @@ static ssize_t gtls_pull(void *s, void *buf, size_t blen)
|
|||
}
|
||||
|
||||
result = Curl_conn_cf_recv(cf->next, data, buf, blen, &nread);
|
||||
CURL_TRC_CF(data, cf, "gtls_pull(len=%zu) -> %d, %zu", blen, result, nread);
|
||||
CURL_TRC_CF(data, cf, "gtls_pull(len=%zu) -> %d, %zu", blen, (int)result,
|
||||
nread);
|
||||
backend->gtls.io_result = result;
|
||||
if(result) {
|
||||
/* !checksrc! disable ERRNOVAR 1 */
|
||||
|
|
@ -2047,7 +2048,8 @@ out:
|
|||
}
|
||||
*done = ((connssl->state == ssl_connection_complete) ||
|
||||
(connssl->state == ssl_connection_deferred));
|
||||
CURL_TRC_CF(data, cf, "gtls_connect_common() -> %d, done=%d", result, *done);
|
||||
CURL_TRC_CF(data, cf, "gtls_connect_common() -> %d, done=%d", (int)result,
|
||||
*done);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -2122,7 +2124,7 @@ static CURLcode gtls_send(struct Curl_cfilter *cf,
|
|||
|
||||
out:
|
||||
CURL_TRC_CF(data, cf, "gtls_send(len=%zu) -> %d, %zu",
|
||||
blen, result, *pnwritten);
|
||||
blen, (int)result, *pnwritten);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ static int mbedtls_bio_cf_write(void *bio,
|
|||
|
||||
result = Curl_conn_cf_send(cf->next, data, buf, blen, FALSE, &nwritten);
|
||||
CURL_TRC_CF(data, cf, "mbedtls_bio_cf_out_write(len=%zu) -> %d, %zu",
|
||||
blen, result, nwritten);
|
||||
blen, (int)result, nwritten);
|
||||
if(result == CURLE_AGAIN)
|
||||
return MBEDTLS_ERR_SSL_WANT_WRITE;
|
||||
return result ? -1 : (int)nwritten;
|
||||
|
|
@ -163,7 +163,7 @@ static int mbedtls_bio_cf_read(void *bio, unsigned char *buf, size_t blen)
|
|||
|
||||
result = Curl_conn_cf_recv(cf->next, data, (char *)buf, blen, &nread);
|
||||
CURL_TRC_CF(data, cf, "mbedtls_bio_cf_in_read(len=%zu) -> %d, %zu",
|
||||
blen, result, nread);
|
||||
blen, (int)result, nread);
|
||||
if(result == CURLE_AGAIN)
|
||||
return MBEDTLS_ERR_SSL_WANT_READ;
|
||||
/* nread is never larger than int here */
|
||||
|
|
@ -464,7 +464,8 @@ static int mbed_verify_cb(void *ptr, mbedtls_x509_crt *crt,
|
|||
mbedtls_x509_crt_verify_info(buf, sizeof(buf), "", *flags);
|
||||
failf(data, "mbedTLS: %s", buf);
|
||||
#else
|
||||
failf(data, "mbedTLS: certificate verification error 0x%08x", *flags);
|
||||
failf(data, "mbedTLS: certificate verification error 0x%08x",
|
||||
(unsigned int)*flags);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -529,7 +530,7 @@ static CURLcode mbed_load_cacert(struct Curl_cfilter *cf,
|
|||
if(ret < 0) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "mbedTLS: error importing CA cert blob: (-0x%04X) %s",
|
||||
-ret, errorbuf);
|
||||
(unsigned int)-ret, errorbuf);
|
||||
return CURLE_SSL_CERTPROBLEM;
|
||||
}
|
||||
}
|
||||
|
|
@ -541,7 +542,7 @@ static CURLcode mbed_load_cacert(struct Curl_cfilter *cf,
|
|||
if(ret < 0) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "mbedTLS: error reading CA cert file %s: (-0x%04X) %s",
|
||||
ssl_cafile, -ret, errorbuf);
|
||||
ssl_cafile, (unsigned int)-ret, errorbuf);
|
||||
return CURLE_SSL_CACERT_BADFILE;
|
||||
}
|
||||
#else
|
||||
|
|
@ -557,7 +558,7 @@ static CURLcode mbed_load_cacert(struct Curl_cfilter *cf,
|
|||
if(ret < 0) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "mbedTLS: error reading CA cert path %s: (-0x%04X) %s",
|
||||
ssl_capath, -ret, errorbuf);
|
||||
ssl_capath, (unsigned int)-ret, errorbuf);
|
||||
|
||||
if(verifypeer)
|
||||
return CURLE_SSL_CACERT_BADFILE;
|
||||
|
|
@ -595,7 +596,7 @@ static CURLcode mbed_load_clicert(struct Curl_cfilter *cf,
|
|||
if(ret) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "mbedTLS: error reading client cert file %s: (-0x%04X) %s",
|
||||
ssl_cert, -ret, errorbuf);
|
||||
ssl_cert, (unsigned int)-ret, errorbuf);
|
||||
|
||||
return CURLE_SSL_CERTPROBLEM;
|
||||
}
|
||||
|
|
@ -642,7 +643,7 @@ static CURLcode mbed_load_clicert(struct Curl_cfilter *cf,
|
|||
if(ret) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "mbedTLS: error reading client cert blob: (-0x%04X) %s",
|
||||
-ret, errorbuf);
|
||||
(unsigned int)-ret, errorbuf);
|
||||
return CURLE_SSL_CERTPROBLEM;
|
||||
}
|
||||
}
|
||||
|
|
@ -689,7 +690,7 @@ static CURLcode mbed_load_privkey(struct Curl_cfilter *cf,
|
|||
if(ret) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "mbedTLS: error reading private key %s: (-0x%04X) %s",
|
||||
ssl_config->primary.key, -ret, errorbuf);
|
||||
ssl_config->primary.key, (unsigned int)-ret, errorbuf);
|
||||
return CURLE_SSL_CERTPROBLEM;
|
||||
}
|
||||
#else
|
||||
|
|
@ -735,7 +736,7 @@ static CURLcode mbed_load_privkey(struct Curl_cfilter *cf,
|
|||
if(ret) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "mbedTLS: error parsing private key: (-0x%04X) %s",
|
||||
-ret, errorbuf);
|
||||
(unsigned int)-ret, errorbuf);
|
||||
return CURLE_SSL_CERTPROBLEM;
|
||||
}
|
||||
}
|
||||
|
|
@ -764,7 +765,7 @@ static CURLcode mbed_load_crl(struct Curl_cfilter *cf,
|
|||
if(ret) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "mbedTLS: error reading CRL file %s: (-0x%04X) %s",
|
||||
ssl_crlfile, -ret, errorbuf);
|
||||
ssl_crlfile, (unsigned int)-ret, errorbuf);
|
||||
|
||||
return CURLE_SSL_CRL_BADFILE;
|
||||
}
|
||||
|
|
@ -859,7 +860,7 @@ static CURLcode mbed_configure_ssl(struct Curl_cfilter *cf,
|
|||
if(ret) {
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "mbedTLS: ssl_setup failed: "
|
||||
"(-0x%04X) %s", -ret, errorbuf);
|
||||
"(-0x%04X) %s", (unsigned int)-ret, errorbuf);
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -910,12 +911,12 @@ static CURLcode mbed_configure_ssl(struct Curl_cfilter *cf,
|
|||
ret = mbedtls_ssl_session_load(&session, sc_session->sdata,
|
||||
sc_session->sdata_len);
|
||||
if(ret) {
|
||||
failf(data, "SSL session error loading: -0x%x", -ret);
|
||||
failf(data, "SSL session error loading: -0x%x", (unsigned int)-ret);
|
||||
}
|
||||
else {
|
||||
ret = mbedtls_ssl_set_session(&backend->ssl, &session);
|
||||
if(ret)
|
||||
failf(data, "SSL session error setting: -0x%x", -ret);
|
||||
failf(data, "SSL session error setting: -0x%x", (unsigned int)-ret);
|
||||
else
|
||||
infof(data, "SSL reusing session ID");
|
||||
}
|
||||
|
|
@ -1054,7 +1055,7 @@ static CURLcode mbed_connect_step2(struct Curl_cfilter *cf,
|
|||
mbedtls_ssl_get_version_number(&backend->ssl));
|
||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "ssl_handshake returned: (-0x%04X) %s",
|
||||
-ret, errorbuf);
|
||||
(unsigned int)-ret, errorbuf);
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -1166,7 +1167,7 @@ static CURLcode mbed_new_session(struct Curl_cfilter *cf,
|
|||
ret = mbedtls_ssl_get_session(&backend->ssl, &session);
|
||||
msession_alloced = (ret != MBEDTLS_ERR_SSL_ALLOC_FAILED);
|
||||
if(ret) {
|
||||
failf(data, "mbedtls_ssl_get_session returned -0x%x", -ret);
|
||||
failf(data, "mbedtls_ssl_get_session returned -0x%x", (unsigned int)-ret);
|
||||
result = CURLE_SSL_CONNECT_ERROR;
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -1185,7 +1186,7 @@ static CURLcode mbed_new_session(struct Curl_cfilter *cf,
|
|||
|
||||
ret = mbedtls_ssl_session_save(&session, sdata, slen, &slen);
|
||||
if(ret) {
|
||||
failf(data, "failed to serialize session: -0x%x", -ret);
|
||||
failf(data, "failed to serialize session: -0x%x", (unsigned int)-ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
@ -1237,7 +1238,7 @@ static CURLcode mbed_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
}
|
||||
else {
|
||||
CURL_TRC_CF(data, cf, "mbedtls_ssl_write(len=%zu) -> -0x%04X",
|
||||
len, -nwritten);
|
||||
len, (unsigned int)-nwritten);
|
||||
switch(nwritten) {
|
||||
#ifdef MBEDTLS_SSL_PROTO_TLS1_3
|
||||
case MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET:
|
||||
|
|
@ -1261,7 +1262,7 @@ static CURLcode mbed_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
}
|
||||
|
||||
CURL_TRC_CF(data, cf, "mbedtls_ssl_write(len=%zu) -> %d, %zu",
|
||||
len, result, *pnwritten);
|
||||
len, (int)result, *pnwritten);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1305,7 +1306,8 @@ static CURLcode mbedtls_shutdown(struct Curl_cfilter *cf,
|
|||
connssl->io_need = CURL_SSL_IO_NEED_SEND;
|
||||
goto out;
|
||||
default:
|
||||
CURL_TRC_CF(data, cf, "mbedtls_shutdown error -0x%04X", -ret);
|
||||
CURL_TRC_CF(data, cf, "mbedtls_shutdown error -0x%04X",
|
||||
(unsigned int)-ret);
|
||||
result = CURLE_RECV_ERROR;
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -1346,7 +1348,8 @@ static CURLcode mbedtls_shutdown(struct Curl_cfilter *cf,
|
|||
connssl->io_need = CURL_SSL_IO_NEED_SEND;
|
||||
}
|
||||
else {
|
||||
CURL_TRC_CF(data, cf, "mbedtls_shutdown error -0x%04X", -ret);
|
||||
CURL_TRC_CF(data, cf, "mbedtls_shutdown error -0x%04X",
|
||||
(unsigned int)-ret);
|
||||
result = CURLE_RECV_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -1396,7 +1399,7 @@ static CURLcode mbed_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
else {
|
||||
char errorbuf[128];
|
||||
CURL_TRC_CF(data, cf, "mbedtls_ssl_read(len=%zu) -> -0x%04X",
|
||||
buffersize, -nread);
|
||||
buffersize, (unsigned int)-nread);
|
||||
switch(nread) {
|
||||
#ifdef MBEDTLS_SSL_SESSION_TICKETS
|
||||
case MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET:
|
||||
|
|
@ -1416,7 +1419,8 @@ static CURLcode mbed_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
break;
|
||||
default:
|
||||
mbedtls_strerror(nread, errorbuf, sizeof(errorbuf));
|
||||
failf(data, "ssl_read returned: (-0x%04X) %s", -nread, errorbuf);
|
||||
failf(data, "ssl_read returned: (-0x%04X) %s", (unsigned int)-nread,
|
||||
errorbuf);
|
||||
result = CURLE_RECV_ERROR;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ static CURLcode ossl_certchain(struct Curl_easy *data, SSL *ssl)
|
|||
if(result)
|
||||
break;
|
||||
|
||||
BIO_printf(mem, "%lx", X509_get_version(x));
|
||||
BIO_printf(mem, "%lx", (unsigned long)X509_get_version(x));
|
||||
result = push_certinfo(data, mem, "Version", i);
|
||||
if(result)
|
||||
break;
|
||||
|
|
@ -581,7 +581,7 @@ static int ossl_bio_cf_out_write(BIO *bio, const char *buf, int blen)
|
|||
(const uint8_t *)buf, (size_t)blen, FALSE,
|
||||
&nwritten);
|
||||
CURL_TRC_CF(data, cf, "ossl_bio_cf_out_write(len=%d) -> %d, %zu",
|
||||
blen, result, nwritten);
|
||||
blen, (int)result, nwritten);
|
||||
BIO_clear_retry_flags(bio);
|
||||
octx->io_result = result;
|
||||
if(result) {
|
||||
|
|
@ -610,7 +610,7 @@ static int ossl_bio_cf_in_read(BIO *bio, char *buf, int blen)
|
|||
|
||||
result = Curl_conn_cf_recv(cf->next, data, buf, (size_t)blen, &nread);
|
||||
CURL_TRC_CF(data, cf, "ossl_bio_cf_in_read(len=%d) -> %d, %zu",
|
||||
blen, result, nread);
|
||||
blen, (int)result, nread);
|
||||
BIO_clear_retry_flags(bio);
|
||||
octx->io_result = result;
|
||||
if(result) {
|
||||
|
|
@ -2065,7 +2065,7 @@ static CURLcode ossl_verifyhost(struct Curl_easy *data,
|
|||
break;
|
||||
default:
|
||||
DEBUGASSERT(0);
|
||||
failf(data, "unexpected SSL peer type: %d", peer->type);
|
||||
failf(data, "unexpected SSL peer type: %d", (int)peer->type);
|
||||
return CURLE_PEER_FAILED_VERIFICATION;
|
||||
}
|
||||
|
||||
|
|
@ -2494,7 +2494,7 @@ static void ossl_trace(int direction, int ssl_ver, int content_type,
|
|||
verstr = "TLSv1.3";
|
||||
break;
|
||||
default:
|
||||
curl_msnprintf(unknown, sizeof(unknown), "(%x)", ssl_ver);
|
||||
curl_msnprintf(unknown, sizeof(unknown), "(%x)", (unsigned int)ssl_ver);
|
||||
verstr = unknown;
|
||||
break;
|
||||
}
|
||||
|
|
@ -3012,7 +3012,7 @@ static CURLcode ossl_load_trust_anchors(struct Curl_cfilter *cf,
|
|||
result = load_cacert_from_memory(store, conn_config->ca_info_blob);
|
||||
if(result) {
|
||||
failf(data, "error adding trust anchors from certificate blob: %d",
|
||||
result);
|
||||
(int)result);
|
||||
return result;
|
||||
}
|
||||
infof(data, " CA Blob from configuration");
|
||||
|
|
@ -3373,7 +3373,7 @@ static CURLcode ossl_init_session_and_alpns(
|
|||
scs->alpn ? scs->alpn : "-");
|
||||
octx->reused_session = TRUE;
|
||||
infof(data, "SSL verify result: %lx",
|
||||
SSL_get_verify_result(octx->ssl));
|
||||
(unsigned long)SSL_get_verify_result(octx->ssl));
|
||||
#ifdef HAVE_OPENSSL_EARLYDATA
|
||||
if(ssl_config->earlydata && scs->alpn &&
|
||||
SSL_SESSION_get_max_early_data(ssl_session) &&
|
||||
|
|
@ -3539,7 +3539,8 @@ static CURLcode ossl_init_ech(struct ossl_ctx *octx,
|
|||
peer->origin->hostname, outername,
|
||||
0 /* do send outer */);
|
||||
if(result != 1) {
|
||||
infof(data, "ECH: rv failed to set server name(s) %d [ERROR]", result);
|
||||
infof(data, "ECH: rv failed to set server name(s) %d [ERROR]",
|
||||
(int)result);
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
@ -4787,7 +4788,7 @@ CURLcode Curl_ossl_check_peer_cert(struct Curl_cfilter *cf,
|
|||
|
||||
ossl_verify = SSL_get_verify_result(octx->ssl);
|
||||
ssl_config->certverifyresult = ossl_verify;
|
||||
infof(data, "OpenSSL verify result: %lx", ossl_verify);
|
||||
infof(data, "OpenSSL verify result: %lx", (unsigned long)ossl_verify);
|
||||
|
||||
verified = (ossl_verify == X509_V_OK);
|
||||
if(verified)
|
||||
|
|
@ -5247,7 +5248,7 @@ out:
|
|||
connssl->input_pending = FALSE;
|
||||
}
|
||||
CURL_TRC_CF(data, cf, "ossl_recv(len=%zu) -> %d, %zu (in_pending=%d)",
|
||||
buffersize, result, *pnread, connssl->input_pending);
|
||||
buffersize, (int)result, *pnread, connssl->input_pending);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ static int read_cb(void *userdata, uint8_t *buf, uintptr_t len,
|
|||
connssl->peer_closed = TRUE;
|
||||
*out_n = (uintptr_t)nread;
|
||||
CURL_TRC_CF(io_ctx->data, io_ctx->cf, "cf->next recv(len=%zu) -> %d, %zu",
|
||||
(size_t)len, result, nread);
|
||||
(size_t)len, (int)result, nread);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ static int write_cb(void *userdata, const uint8_t *buf, uintptr_t len,
|
|||
}
|
||||
*out_n = (uintptr_t)nwritten;
|
||||
CURL_TRC_CF(io_ctx->data, io_ctx->cf, "cf->next send(len=%zu) -> %d, %zu",
|
||||
len, result, nwritten);
|
||||
len, (int)result, nwritten);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -252,7 +252,7 @@ static CURLcode cr_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
|
||||
out:
|
||||
CURL_TRC_CF(data, cf, "rustls_recv(len=%zu) -> %d, %zu",
|
||||
plainlen, result, *pnread);
|
||||
plainlen, (int)result, *pnread);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -328,7 +328,7 @@ static CURLcode cr_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
if(backend->plain_out_buffered) {
|
||||
result = cr_flush_out(cf, data, rconn);
|
||||
CURL_TRC_CF(data, cf, "cf_send: flushing %zu previously added bytes -> %d",
|
||||
backend->plain_out_buffered, result);
|
||||
backend->plain_out_buffered, (int)result);
|
||||
if(result)
|
||||
return result;
|
||||
if(blen > backend->plain_out_buffered) {
|
||||
|
|
@ -374,7 +374,7 @@ static CURLcode cr_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
|
||||
out:
|
||||
CURL_TRC_CF(data, cf, "rustls_send(len=%zu) -> %d, %zu",
|
||||
plainlen, result, *pnwritten);
|
||||
plainlen, (int)result, *pnwritten);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1149,7 +1149,7 @@ static CURLcode cr_connect(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
|
||||
DEBUGASSERT(backend);
|
||||
|
||||
CURL_TRC_CF(data, cf, "cr_connect, state=%d", connssl->state);
|
||||
CURL_TRC_CF(data, cf, "cr_connect, state=%d", (int)connssl->state);
|
||||
*done = FALSE;
|
||||
|
||||
#ifdef USE_ECH
|
||||
|
|
@ -1166,7 +1166,7 @@ static CURLcode cr_connect(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
result =
|
||||
cr_init_backend(cf, data,
|
||||
(struct rustls_ssl_backend_data *)connssl->backend);
|
||||
CURL_TRC_CF(data, cf, "cr_connect, init backend -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "cr_connect, init backend -> %d", (int)result);
|
||||
if(result)
|
||||
return result;
|
||||
connssl->state = ssl_connection_negotiating;
|
||||
|
|
@ -1358,7 +1358,7 @@ static CURLcode cr_shutdown(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
goto out;
|
||||
}
|
||||
DEBUGASSERT(result);
|
||||
CURL_TRC_CF(data, cf, "shutdown send failed: %d", result);
|
||||
CURL_TRC_CF(data, cf, "shutdown send failed: %d", (int)result);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
@ -1375,7 +1375,7 @@ static CURLcode cr_shutdown(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
}
|
||||
else if(result) {
|
||||
DEBUGASSERT(result);
|
||||
CURL_TRC_CF(data, cf, "shutdown, error: %d", result);
|
||||
CURL_TRC_CF(data, cf, "shutdown, error: %d", (int)result);
|
||||
}
|
||||
else if(nread == 0) {
|
||||
/* We got the close notify alert and are done. */
|
||||
|
|
|
|||
|
|
@ -2190,7 +2190,7 @@ static CURLcode schannel_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
if(result == CURLE_AGAIN)
|
||||
SCH_DEV(infof(data, "schannel: recv returned CURLE_AGAIN"));
|
||||
else {
|
||||
infof(data, "schannel: recv returned error %d", result);
|
||||
infof(data, "schannel: recv returned error %d", (int)result);
|
||||
backend->recv_unrecoverable_err = result;
|
||||
}
|
||||
}
|
||||
|
|
@ -2509,7 +2509,7 @@ static CURLcode schannel_shutdown(struct Curl_cfilter *cf,
|
|||
else {
|
||||
if(!backend->recv_connection_closed) {
|
||||
result = CURLE_SEND_ERROR;
|
||||
failf(data, "schannel: error sending close msg: %d", result);
|
||||
failf(data, "schannel: error sending close msg: %d", (int)result);
|
||||
goto out;
|
||||
}
|
||||
/* Looks like server already closed the connection.
|
||||
|
|
@ -2532,7 +2532,7 @@ static CURLcode schannel_shutdown(struct Curl_cfilter *cf,
|
|||
connssl->io_need = CURL_SSL_IO_NEED_RECV;
|
||||
}
|
||||
else if(result) {
|
||||
CURL_TRC_CF(data, cf, "SSL shutdown, error %d", result);
|
||||
CURL_TRC_CF(data, cf, "SSL shutdown, error %d", (int)result);
|
||||
result = CURLE_RECV_ERROR;
|
||||
}
|
||||
else if(nread == 0) {
|
||||
|
|
|
|||
|
|
@ -1025,7 +1025,7 @@ static CURLcode ssl_cf_connect(struct Curl_cfilter *cf,
|
|||
connssl->earlydata_state > ssl_earlydata_none);
|
||||
}
|
||||
out:
|
||||
CURL_TRC_CF(data, cf, "cf_connect() -> %d, done=%d", result, *done);
|
||||
CURL_TRC_CF(data, cf, "cf_connect() -> %d, done=%d", (int)result, *done);
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1215,7 +1215,7 @@ static CURLcode ssl_cf_shutdown(struct Curl_cfilter *cf,
|
|||
|
||||
CF_DATA_SAVE(save, cf, data);
|
||||
result = connssl->ssl_impl->shut_down(cf, data, TRUE, done);
|
||||
CURL_TRC_CF(data, cf, "cf_shutdown -> %d, done=%d", result, *done);
|
||||
CURL_TRC_CF(data, cf, "cf_shutdown -> %d, done=%d", (int)result, *done);
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
cf->shutdown = (result || *done);
|
||||
}
|
||||
|
|
@ -1567,7 +1567,8 @@ CURLcode Curl_ssl_cfilter_remove(struct Curl_easy *data,
|
|||
if(!result && !done) /* blocking failed? */
|
||||
result = CURLE_SSL_SHUTDOWN_FAILED;
|
||||
Curl_conn_cf_discard(&cf, data);
|
||||
CURL_TRC_CF(data, cf, "shutdown and remove SSL, done -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "shutdown and remove SSL, done -> %d",
|
||||
(int)result);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -902,7 +902,7 @@ static CURLcode cf_scache_add_session(struct Curl_cfilter *cf,
|
|||
|
||||
result = cf_ssl_add_peer(data, scache, ssl_peer_key, conn_config, &peer);
|
||||
if(result || !peer) {
|
||||
CURL_TRC_SSLS(data, "unable to add scache peer: %d", result);
|
||||
CURL_TRC_SSLS(data, "unable to add scache peer: %d", (int)result);
|
||||
Curl_ssl_session_destroy(s);
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -912,13 +912,13 @@ static CURLcode cf_scache_add_session(struct Curl_cfilter *cf,
|
|||
out:
|
||||
if(result) {
|
||||
failf(data, "[SCACHE] failed to add session for %s, error=%d",
|
||||
ssl_peer_key, result);
|
||||
ssl_peer_key, (int)result);
|
||||
}
|
||||
else
|
||||
CURL_TRC_SSLS(data, "added session for %s [proto=0x%x, "
|
||||
"valid_secs=%" FMT_OFF_T ", alpn=%s, earlydata=%zu, "
|
||||
"quic_tp=%s], peer has %zu sessions now",
|
||||
ssl_peer_key, s->ietf_tls_id, s->valid_until - now,
|
||||
"quic_tp=%s], peer has %zu sessions now", ssl_peer_key,
|
||||
(unsigned int)s->ietf_tls_id, s->valid_until - now,
|
||||
s->alpn, s->earlydata_max, s->quic_tp ? "yes" : "no",
|
||||
peer ? Curl_llist_count(&peer->sessions) : 0);
|
||||
return result;
|
||||
|
|
@ -990,7 +990,7 @@ CURLcode Curl_ssl_scache_take(struct Curl_cfilter *cf,
|
|||
*ps = s;
|
||||
CURL_TRC_SSLS(data, "took session for %s [proto=0x%x, "
|
||||
"alpn=%s, earlydata=%zu, quic_tp=%s], %zu sessions remain",
|
||||
ssl_peer_key, s->ietf_tls_id, s->alpn,
|
||||
ssl_peer_key, (unsigned int)s->ietf_tls_id, s->alpn,
|
||||
s->earlydata_max, s->quic_tp ? "yes" : "no",
|
||||
Curl_llist_count(&peer->sessions));
|
||||
}
|
||||
|
|
@ -1022,7 +1022,7 @@ CURLcode Curl_ssl_scache_add_obj(struct Curl_cfilter *cf,
|
|||
|
||||
result = cf_ssl_add_peer(data, scache, ssl_peer_key, conn_config, &peer);
|
||||
if(result || !peer) {
|
||||
CURL_TRC_SSLS(data, "unable to add scache peer: %d", result);
|
||||
CURL_TRC_SSLS(data, "unable to add scache peer: %d", (int)result);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ CURLcode Curl_ssl_session_pack(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
if(result)
|
||||
CURL_TRC_SSLS(data, "error packing data: %d", result);
|
||||
CURL_TRC_SSLS(data, "error packing data: %d", (int)result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -311,7 +311,7 @@ CURLcode Curl_ssl_session_unpack(struct Curl_easy *data,
|
|||
|
||||
out:
|
||||
if(result) {
|
||||
CURL_TRC_SSLS(data, "error unpacking data: %d", result);
|
||||
CURL_TRC_SSLS(data, "error unpacking data: %d", (int)result);
|
||||
Curl_ssl_session_destroy(s);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ static int wssl_bio_cf_out_write(WOLFSSL_BIO *bio, const char *buf, int blen)
|
|||
(const uint8_t *)buf, blen, FALSE, &nwritten);
|
||||
wssl->io_result = result;
|
||||
CURL_TRC_CF(data, cf, "bio_write(len=%d) -> %d, %zu",
|
||||
blen, result, nwritten);
|
||||
blen, (int)result, nwritten);
|
||||
#ifdef USE_FULL_BIO
|
||||
wolfSSL_BIO_clear_retry_flags(bio);
|
||||
#endif
|
||||
|
|
@ -360,7 +360,7 @@ static int wssl_bio_cf_in_read(WOLFSSL_BIO *bio, char *buf, int blen)
|
|||
* server response. This allows sending of ClientHello without delay. */
|
||||
result = Curl_wssl_setup_x509_store(cf, data, wssl);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "Curl_wssl_setup_x509_store() -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "Curl_wssl_setup_x509_store() -> %d", (int)result);
|
||||
wssl->io_result = result;
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -368,7 +368,8 @@ static int wssl_bio_cf_in_read(WOLFSSL_BIO *bio, char *buf, int blen)
|
|||
|
||||
result = Curl_conn_cf_recv(cf->next, data, buf, blen, &nread);
|
||||
wssl->io_result = result;
|
||||
CURL_TRC_CF(data, cf, "bio_read(len=%d) -> %d, %zu", blen, result, nread);
|
||||
CURL_TRC_CF(data, cf, "bio_read(len=%d) -> %d, %zu", blen, (int)result,
|
||||
nread);
|
||||
#ifdef USE_FULL_BIO
|
||||
wolfSSL_BIO_clear_retry_flags(bio);
|
||||
#endif
|
||||
|
|
@ -1720,7 +1721,7 @@ static CURLcode wssl_handshake(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|||
* store to verify the coming certificate from the server */
|
||||
result = Curl_wssl_setup_x509_store(cf, data, wssl);
|
||||
if(result) {
|
||||
CURL_TRC_CF(data, cf, "Curl_wssl_setup_x509_store() -> %d", result);
|
||||
CURL_TRC_CF(data, cf, "Curl_wssl_setup_x509_store() -> %d", (int)result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -1913,7 +1914,7 @@ static CURLcode wssl_send(struct Curl_cfilter *cf,
|
|||
|
||||
out:
|
||||
CURL_TRC_CF(data, cf, "wssl_send(len=%zu) -> %d, %zu",
|
||||
blen, result, *pnwritten);
|
||||
blen, (int)result, *pnwritten);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
21
lib/ws.c
21
lib/ws.c
|
|
@ -727,7 +727,7 @@ static CURLcode ws_cw_write(struct Curl_easy *data,
|
|||
result = Curl_bufq_write(&ctx->buf, (const uint8_t *)buf,
|
||||
nbytes, &nwritten);
|
||||
if(result) {
|
||||
infof(data, "[WS] error adding data to buffer %d", result);
|
||||
infof(data, "[WS] error adding data to buffer %d", (int)result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -996,7 +996,7 @@ static CURLcode ws_enc_add_pending(struct Curl_easy *data,
|
|||
&ws->sendbuf);
|
||||
if(result) {
|
||||
CURL_TRC_WS(data, "ws_enc_cntrl(), error adding head: %d",
|
||||
result);
|
||||
(int)result);
|
||||
goto out;
|
||||
}
|
||||
result = ws_enc_write_payload(&ws->enc, data, ws->pending.payload,
|
||||
|
|
@ -1004,7 +1004,7 @@ static CURLcode ws_enc_add_pending(struct Curl_easy *data,
|
|||
&ws->sendbuf, &n);
|
||||
if(result) {
|
||||
CURL_TRC_WS(data, "ws_enc_cntrl(), error adding payload: %d",
|
||||
result);
|
||||
(int)result);
|
||||
goto out;
|
||||
}
|
||||
if(n != ws->pending.payload_len) {
|
||||
|
|
@ -1066,7 +1066,8 @@ static CURLcode ws_enc_send(struct Curl_easy *data,
|
|||
fragsize : (curl_off_t)buflen,
|
||||
&ws->sendbuf);
|
||||
if(result) {
|
||||
CURL_TRC_WS(data, "curl_ws_send(), error writing frame head %d", result);
|
||||
CURL_TRC_WS(data, "curl_ws_send(), error writing frame head %d",
|
||||
(int)result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -1220,7 +1221,7 @@ static CURLcode cr_ws_read(struct Curl_easy *data,
|
|||
|
||||
out:
|
||||
CURL_TRC_READ(data, "cr_ws_read(len=%zu) -> %d, nread=%zu, eos=%d",
|
||||
blen, result, *pnread, *peos);
|
||||
blen, (int)result, *pnread, *peos);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1444,7 +1445,7 @@ out:
|
|||
if(ws_enc_reader)
|
||||
Curl_creader_free(data, ws_enc_reader);
|
||||
if(result)
|
||||
CURL_TRC_WS(data, "Curl_ws_accept() failed -> %d", result);
|
||||
CURL_TRC_WS(data, "Curl_ws_accept() failed -> %d", (int)result);
|
||||
else
|
||||
CURL_TRC_WS(data, "websocket established, %s mode",
|
||||
data->set.connect_only ? "connect-only" : "callback");
|
||||
|
|
@ -1679,7 +1680,7 @@ static CURLcode ws_flush(struct Curl_easy *data, struct websocket *ws,
|
|||
return result;
|
||||
}
|
||||
else if(result) {
|
||||
failf(data, "[WS] flush, write error %d", result);
|
||||
failf(data, "[WS] flush, write error %d", (int)result);
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
|
|
@ -1770,7 +1771,7 @@ static CURLcode ws_send_raw(struct Curl_easy *data, const void *buffer,
|
|||
}
|
||||
|
||||
CURL_TRC_WS(data, "ws_send_raw(len=%zu) -> %d, %zu",
|
||||
buflen, result, *pnwritten);
|
||||
buflen, (int)result, *pnwritten);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1846,7 +1847,7 @@ CURLcode curl_ws_send(CURL *curl, const void *buffer_arg,
|
|||
out:
|
||||
CURL_TRC_WS(data, "curl_ws_send(len=%zu, fragsize=%" FMT_OFF_T
|
||||
", flags=%x, raw=%d) -> %d, %zu",
|
||||
buflen, fragsize, flags, data->set.ws_raw_mode, result,
|
||||
buflen, fragsize, flags, data->set.ws_raw_mode, (int)result,
|
||||
*pnsent);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1918,7 +1919,7 @@ CURL_EXTERN CURLcode curl_ws_start_frame(CURL *curl,
|
|||
&ws->sendbuf);
|
||||
if(result)
|
||||
CURL_TRC_WS(data, "curl_start_frame(), error adding frame head %d",
|
||||
result);
|
||||
(int)result);
|
||||
|
||||
out:
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -948,7 +948,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
|
||||
dnl clang 19 or later
|
||||
if test "$compiler_num" -ge "1901"; then
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-format-signedness"
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [format-signedness])
|
||||
fi
|
||||
|
||||
dnl clang 20 or later
|
||||
|
|
@ -1144,7 +1144,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
dnl Only gcc 5 or later
|
||||
if test "$compiler_num" -ge "500"; then
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Warray-bounds=2"
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-format-signedness"
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [format-signedness])
|
||||
fi
|
||||
|
||||
dnl Only gcc 6 or later
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ int main(int argc, char *argv[])
|
|||
/* win32_init must be called before other init routines. */
|
||||
result = win32_init();
|
||||
if(result) {
|
||||
errorf("(%d) Windows-specific init failed", result);
|
||||
errorf("(%d) Windows-specific init failed", (int)result);
|
||||
return (int)result;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -616,7 +616,7 @@ static CURLcode post_check_result(struct per_transfer *per, CURLcode result)
|
|||
if(!config->synthetic_error && result &&
|
||||
(!global->silent || global->showerror)) {
|
||||
const char *msg = per->errorbuffer;
|
||||
curl_mfprintf(tool_stderr, "curl: (%d) %s\n", result,
|
||||
curl_mfprintf(tool_stderr, "curl: (%d) %s\n", (int)result,
|
||||
msg[0] ? msg : curl_easy_strerror(result));
|
||||
if(result == CURLE_PEER_FAILED_VERIFICATION)
|
||||
fputs(CURL_CA_CERT_ERRORMSG, tool_stderr);
|
||||
|
|
@ -697,7 +697,7 @@ static CURLcode post_close_output(struct per_transfer *per,
|
|||
if(!result && rc) {
|
||||
/* something went wrong in the writing process */
|
||||
result = CURLE_WRITE_ERROR;
|
||||
errorf("curl: (%d) Failed writing body", result);
|
||||
errorf("curl: (%d) Failed writing body", (int)result);
|
||||
}
|
||||
if(result && config->rm_partial) {
|
||||
curlx_struct_stat st;
|
||||
|
|
@ -856,7 +856,7 @@ static CURLcode append2query(struct OperationConfig *config,
|
|||
if(uerr) {
|
||||
result = urlerr_cvt(uerr);
|
||||
errorf("(%d) Could not parse the URL, "
|
||||
"failed to set query", result);
|
||||
"failed to set query", (int)result);
|
||||
config->synthetic_error = TRUE;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ CURLcode tool_ssls_load(struct OperationConfig *config,
|
|||
result = curl_easy_ssls_import(easy, NULL, shmac, shmac_len, sdata,
|
||||
sdata_len);
|
||||
if(result) {
|
||||
warnf("import of session from line %d rejected(%d)", i, result);
|
||||
warnf("import of session from line %d rejected(%d)", i, (int)result);
|
||||
continue;
|
||||
}
|
||||
++imported;
|
||||
|
|
@ -179,7 +179,7 @@ static CURLcode tool_ssls_exp(CURL *easy, void *userptr,
|
|||
out:
|
||||
if(result)
|
||||
warnf("Warning: error saving SSL session for '%s': %d", session_key,
|
||||
result);
|
||||
(int)result);
|
||||
curlx_free(enc);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ void glob_show_error(struct URLGlob *glob, const char *url, FILE *error,
|
|||
t = glob->error;
|
||||
|
||||
/* send error description to the error-stream */
|
||||
curl_mfprintf(error, "curl: (%d) %s\n", result, t);
|
||||
curl_mfprintf(error, "curl: (%d) %s\n", (int)result, t);
|
||||
}
|
||||
|
||||
CURLcode glob_url(struct URLGlob *glob, const char *url, curl_off_t *urlnum,
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ static CURLcode test_cli_ftp_upload(const char *URL)
|
|||
curl_global_cleanup();
|
||||
curl_slist_free_all(host);
|
||||
|
||||
curl_mfprintf(stderr, "transfer result: %d\n", result);
|
||||
curl_mfprintf(stderr, "transfer result: %d\n", (int)result);
|
||||
return result;
|
||||
#else /* !CURL_DISABLE_FTP */
|
||||
(void)URL;
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ static CURLcode test_cli_h2_pausing(const char *URL)
|
|||
curl_mfprintf(stderr, "ERROR: [%zu] done, paused=%d, "
|
||||
"resumed=%d, result %d - wtf?\n", i,
|
||||
handles[i].paused,
|
||||
handles[i].resumed, msg->data.result);
|
||||
handles[i].resumed, (int)msg->data.result);
|
||||
result = (CURLcode)1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ static CURLcode test_cli_h2_upgrade_extreme(const char *URL)
|
|||
}
|
||||
else if(msg->data.result) {
|
||||
curl_mfprintf(stderr, "transfer #%" CURL_FORMAT_CURL_OFF_T
|
||||
": failed with %d\n", xfer_id, msg->data.result);
|
||||
": failed with %d\n", xfer_id, (int)msg->data.result);
|
||||
goto cleanup;
|
||||
}
|
||||
else if(status != 206) {
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ static int my_progress_d_cb(void *userdata,
|
|||
result = curl_easy_getinfo(t->curl, CURLINFO_TLS_SSL_PTR, &tls);
|
||||
if(result) {
|
||||
curl_mfprintf(stderr, "[t-%zu] info CURLINFO_TLS_SSL_PTR failed: %d\n",
|
||||
t->idx, result);
|
||||
t->idx, (int)result);
|
||||
assert(0);
|
||||
}
|
||||
else {
|
||||
|
|
@ -199,7 +199,7 @@ static int my_progress_d_cb(void *userdata,
|
|||
(struct rustls_connection *)tls->internals);
|
||||
assert(v);
|
||||
curl_mfprintf(stderr, "[t-%zu] info rustls TLS version 0x%x\n",
|
||||
t->idx, v);
|
||||
t->idx, (unsigned int)v);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -214,13 +214,13 @@ static int my_progress_d_cb(void *userdata,
|
|||
assert(sspi_status == SEC_E_OK);
|
||||
(void)sspi_status;
|
||||
curl_mfprintf(stderr, "[t-%zu] info Schannel TLS version 0x%08lx\n",
|
||||
t->idx, info.dwProtocol);
|
||||
t->idx, (unsigned long)info.dwProtocol);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
curl_mfprintf(stderr, "[t-%zu] info SSL_PTR backend=%d, ptr=%p\n",
|
||||
t->idx, tls->backend, tls->internals);
|
||||
t->idx, (int)tls->backend, tls->internals);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -502,7 +502,7 @@ static CURLcode test_cli_hx_download(const char *URL)
|
|||
t->done = 1;
|
||||
t->result = m->data.result;
|
||||
curl_mfprintf(stderr, "[t-%zu] FINISHED with result %d\n",
|
||||
t->idx, t->result);
|
||||
t->idx, (int)t->result);
|
||||
if(use_earlydata) {
|
||||
curl_off_t sent;
|
||||
curl_easy_getinfo(easy, CURLINFO_EARLYDATA_SENT_T, &sent);
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ static CURLcode test_cli_hx_upload(const char *URL)
|
|||
|
||||
curl_mfprintf(stderr, "[t-%zu] STARTING\n", t->idx);
|
||||
rc = curl_easy_perform(curl);
|
||||
curl_mfprintf(stderr, "[t-%zu] DONE -> %d\n", t->idx, rc);
|
||||
curl_mfprintf(stderr, "[t-%zu] DONE -> %d\n", t->idx, (int)rc);
|
||||
t->curl = NULL;
|
||||
curl_easy_reset(curl);
|
||||
}
|
||||
|
|
@ -448,7 +448,7 @@ static CURLcode test_cli_hx_upload(const char *URL)
|
|||
t->done = 1;
|
||||
curl_mfprintf(stderr, "[t-%zu] FINISHED, "
|
||||
"result=%d, response=%ld\n",
|
||||
t->idx, m->data.result, res_status);
|
||||
t->idx, (int)m->data.result, res_status);
|
||||
if(use_earlydata) {
|
||||
curl_off_t sent;
|
||||
curl_easy_getinfo(easy, CURLINFO_EARLYDATA_SENT_T, &sent);
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ static CURLcode test_cli_tls_session_reuse(const char *URL)
|
|||
}
|
||||
else if(msg->data.result) {
|
||||
curl_mfprintf(stderr, "transfer #%" CURL_FORMAT_CURL_OFF_T
|
||||
": failed with %d\n", xfer_id, msg->data.result);
|
||||
": failed with %d\n", xfer_id, (int)msg->data.result);
|
||||
goto cleanup;
|
||||
}
|
||||
else if(status != 200) {
|
||||
|
|
|
|||
|
|
@ -37,13 +37,13 @@ static CURLcode test_ws_data_m2_check_recv(const struct curl_ws_frame *frame,
|
|||
if(frame->flags & CURLWS_CLOSE) {
|
||||
curl_mfprintf(stderr, "recv_data: unexpected CLOSE frame from server, "
|
||||
"got %zu bytes, offset=%zu, rflags %x\n",
|
||||
nread, r_offset, frame->flags);
|
||||
nread, r_offset, (unsigned int)frame->flags);
|
||||
return CURLE_RECV_ERROR;
|
||||
}
|
||||
if(!r_offset && !(frame->flags & CURLWS_BINARY)) {
|
||||
curl_mfprintf(stderr, "recv_data: wrong frame, got %zu bytes, offset=%zu, "
|
||||
"rflags %x\n",
|
||||
nread, r_offset, frame->flags);
|
||||
nread, r_offset, (unsigned int)frame->flags);
|
||||
return CURLE_RECV_ERROR;
|
||||
}
|
||||
if(frame->offset != (curl_off_t)r_offset) {
|
||||
|
|
@ -104,7 +104,7 @@ static CURLcode test_ws_data_m2_echo(const char *url,
|
|||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 2L); /* websocket style */
|
||||
result = curl_easy_perform(curl);
|
||||
curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", result);
|
||||
curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", (int)result);
|
||||
if(result != CURLE_OK)
|
||||
goto out;
|
||||
|
||||
|
|
@ -120,8 +120,8 @@ static CURLcode test_ws_data_m2_echo(const char *url,
|
|||
sblock = (result == CURLE_AGAIN);
|
||||
if(!result || (result == CURLE_AGAIN)) {
|
||||
curl_mfprintf(stderr, "curl_ws_send(len=%zu) -> %d, "
|
||||
"%zu (%" CURL_FORMAT_CURL_OFF_T "/%zu)\n",
|
||||
slen, result, nwritten, (curl_off_t)(len - slen), len);
|
||||
"%zu (%" CURL_FORMAT_CURL_OFF_T "/%zu)\n", slen,
|
||||
(int)result, nwritten, (curl_off_t)(len - slen), len);
|
||||
sbuf += nwritten;
|
||||
slen -= nwritten;
|
||||
}
|
||||
|
|
@ -140,8 +140,8 @@ static CURLcode test_ws_data_m2_echo(const char *url,
|
|||
&nread, &frame);
|
||||
if(!result || (result == CURLE_AGAIN)) {
|
||||
rblock = (result == CURLE_AGAIN);
|
||||
curl_mfprintf(stderr, "curl_ws_recv(len=%zu) -> %d, %zu (%ld/%zu) "
|
||||
"\n", rlen, result, nread, (long)(len - rlen), len);
|
||||
curl_mfprintf(stderr, "curl_ws_recv(len=%zu) -> %d, %zu (%ld/%zu)\n",
|
||||
rlen, (int)result, nread, (long)(len - rlen), len);
|
||||
if(!result) {
|
||||
result = test_ws_data_m2_check_recv(frame, len - rlen, nread, len);
|
||||
if(result)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ static CURLcode test_cli_ws_pingpong(const char *URL)
|
|||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 2L); /* websocket style */
|
||||
result = curl_easy_perform(curl);
|
||||
curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", result);
|
||||
curl_mfprintf(stderr, "curl_easy_perform() returned %d\n", (int)result);
|
||||
if(result == CURLE_OK)
|
||||
result = pingpong(curl, payload);
|
||||
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ CURLcode ws_send_ping(CURL *curl, const char *send_payload)
|
|||
CURLcode result = curl_ws_send(curl, send_payload, strlen(send_payload),
|
||||
&sent, 0, CURLWS_PING);
|
||||
curl_mfprintf(stderr, "ws: curl_ws_send returned %d, sent %zu\n",
|
||||
result, sent);
|
||||
(int)result, sent);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -181,13 +181,13 @@ CURLcode ws_recv_pong(CURL *curl, const char *expected_payload)
|
|||
CURLcode result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);
|
||||
if(result) {
|
||||
curl_mfprintf(stderr, "ws: curl_ws_recv returned %d, received %zu\n",
|
||||
result, rlen);
|
||||
(int)result, rlen);
|
||||
return result;
|
||||
}
|
||||
|
||||
if(!(meta->flags & CURLWS_PONG)) {
|
||||
curl_mfprintf(stderr, "recv_pong: wrong frame, got %zu bytes rflags %x\n",
|
||||
rlen, meta->flags);
|
||||
rlen, (unsigned int)meta->flags);
|
||||
return CURLE_RECV_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ void ws_close(CURL *curl)
|
|||
size_t sent;
|
||||
CURLcode result = curl_ws_send(curl, "", 0, &sent, 0, CURLWS_CLOSE);
|
||||
curl_mfprintf(stderr, "ws: curl_ws_send returned %d, sent %zu\n",
|
||||
result, sent);
|
||||
(int)result, sent);
|
||||
}
|
||||
#endif /* CURL_DISABLE_WEBSOCKETS */
|
||||
|
||||
|
|
@ -289,7 +289,7 @@ int main(int argc, const char **argv)
|
|||
#endif
|
||||
|
||||
result = entry_func(URL);
|
||||
curl_mfprintf(stderr, "Test ended with result %d\n", result);
|
||||
curl_mfprintf(stderr, "Test ended with result %d\n", (int)result);
|
||||
|
||||
#ifdef _WIN32
|
||||
/* flush buffers of all streams regardless of mode */
|
||||
|
|
@ -298,5 +298,5 @@ int main(int argc, const char **argv)
|
|||
|
||||
/* Regular program status codes are limited to 0..127 and 126 and 127 have
|
||||
* special meanings by the shell, so limit a normal return code to 125 */
|
||||
return (int)result <= 125 ? (int)result : 125;
|
||||
return result <= 125 ? result : 125;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,16 +201,16 @@ void ws_close(CURL *curl); /* close the connection */
|
|||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
#define exe_easy_setopt(A, B, C, Y, Z) \
|
||||
do { \
|
||||
CURLcode ec = curl_easy_setopt(A, B, C); \
|
||||
if(ec != CURLE_OK) { \
|
||||
curl_mfprintf(stderr, \
|
||||
"%s:%d curl_easy_setopt() failed, " \
|
||||
"with code %d (%s)\n", \
|
||||
Y, Z, ec, curl_easy_strerror(ec)); \
|
||||
result = ec; \
|
||||
} \
|
||||
#define exe_easy_setopt(A, B, C, Y, Z) \
|
||||
do { \
|
||||
CURLcode ec = curl_easy_setopt(A, B, C); \
|
||||
if(ec != CURLE_OK) { \
|
||||
curl_mfprintf(stderr, \
|
||||
"%s:%d curl_easy_setopt() failed, " \
|
||||
"with code %d (%s)\n", \
|
||||
Y, Z, (int)ec, curl_easy_strerror(ec)); \
|
||||
result = ec; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define res_easy_setopt(A, B, C) \
|
||||
|
|
@ -559,16 +559,16 @@ void ws_close(CURL *curl); /* close the connection */
|
|||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
#define exe_global_init(A, Y, Z) \
|
||||
do { \
|
||||
CURLcode ec = curl_global_init(A); \
|
||||
if(ec != CURLE_OK) { \
|
||||
curl_mfprintf(stderr, \
|
||||
"%s:%d curl_global_init() failed, " \
|
||||
"with code %d (%s)\n", \
|
||||
Y, Z, ec, curl_easy_strerror(ec)); \
|
||||
result = ec; \
|
||||
} \
|
||||
#define exe_global_init(A, Y, Z) \
|
||||
do { \
|
||||
CURLcode ec = curl_global_init(A); \
|
||||
if(ec != CURLE_OK) { \
|
||||
curl_mfprintf(stderr, \
|
||||
"%s:%d curl_global_init() failed, " \
|
||||
"with code %d (%s)\n", \
|
||||
Y, Z, (int)ec, curl_easy_strerror(ec)); \
|
||||
result = ec; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define chk_global_init(A, Y, Z) \
|
||||
|
|
|
|||
|
|
@ -102,12 +102,12 @@ static int onetest(CURL *curl, const char *url, const struct testparams *p,
|
|||
result = curl_easy_perform(curl);
|
||||
if(result != p->result) {
|
||||
curl_mprintf("%zu: bad error code (%d): resume=%s, fail=%s, http416=%s, "
|
||||
"content-range=%s, expected=%d\n", num, result,
|
||||
"content-range=%s, expected=%d\n", num, (int)result,
|
||||
(p->flags & F_RESUME) ? "yes" : "no",
|
||||
(p->flags & F_FAIL) ? "yes" : "no",
|
||||
(p->flags & F_HTTP416) ? "yes" : "no",
|
||||
(p->flags & F_CONTENTRANGE) ? "yes" : "no",
|
||||
p->result);
|
||||
(int)p->result);
|
||||
return 1;
|
||||
}
|
||||
if(hasbody && (p->flags & F_IGNOREBODY)) {
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ static size_t t1485_header_callback(char *ptr, size_t size, size_t nmemb,
|
|||
/* end of a response */
|
||||
result = curl_easy_getinfo(st->curl, CURLINFO_RESPONSE_CODE, &httpcode);
|
||||
curl_mfprintf(stderr, "header_callback, get status: %ld, %d\n",
|
||||
httpcode, result);
|
||||
httpcode, (int)result);
|
||||
if(httpcode < 100 || httpcode >= 1000) {
|
||||
curl_mfprintf(stderr, "header_callback, invalid status: %ld, %d\n",
|
||||
httpcode, result);
|
||||
httpcode, (int)result);
|
||||
return CURLE_WRITE_ERROR;
|
||||
}
|
||||
st->http_status = (int)httpcode;
|
||||
|
|
@ -58,7 +58,7 @@ static size_t t1485_header_callback(char *ptr, size_t size, size_t nmemb,
|
|||
result = curl_easy_getinfo(st->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
|
||||
&clen);
|
||||
curl_mfprintf(stderr, "header_callback, info Content-Length: "
|
||||
"%" CURL_FORMAT_CURL_OFF_T ", %d\n", clen, result);
|
||||
"%" CURL_FORMAT_CURL_OFF_T ", %d\n", clen, (int)result);
|
||||
if(result) {
|
||||
st->result = result;
|
||||
return CURLE_WRITE_ERROR;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ static CURLcode test_lib1509(const char *URL)
|
|||
if(code != CURLE_OK) {
|
||||
curl_mfprintf(stderr, "%s:%d curl_easy_perform() failed, "
|
||||
"with code %d (%s)\n",
|
||||
__FILE__, __LINE__, code, curl_easy_strerror(code));
|
||||
__FILE__, __LINE__, (int)code, curl_easy_strerror(code));
|
||||
result = TEST_ERR_MAJOR_BAD;
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ static CURLcode test_lib1509(const char *URL)
|
|||
if(code != CURLE_OK) {
|
||||
curl_mfprintf(stderr, "%s:%d curl_easy_getinfo() failed, "
|
||||
"with code %d (%s)\n",
|
||||
__FILE__, __LINE__, code, curl_easy_strerror(code));
|
||||
__FILE__, __LINE__, (int)code, curl_easy_strerror(code));
|
||||
result = TEST_ERR_MAJOR_BAD;
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,8 @@ static CURLcode test_lib1515(const char *URL)
|
|||
/* second request must succeed like the first one */
|
||||
result = do_one_request(multi, target_url, dns_entry);
|
||||
if(result != CURLE_OK) {
|
||||
curl_mfprintf(stderr, "request %s failed with %d\n", target_url, result);
|
||||
curl_mfprintf(stderr, "request %s failed with %d\n", target_url,
|
||||
(int)result);
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ static CURLcode test_lib1518(const char *URL)
|
|||
"redirects %ld\n"
|
||||
"effectiveurl %s\n"
|
||||
"redirecturl %s\n",
|
||||
result,
|
||||
(int)result,
|
||||
curlResponseCode,
|
||||
curlRedirectCount,
|
||||
effectiveUrl,
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ static CURLcode test_lib1522(const char *URL)
|
|||
}
|
||||
}
|
||||
else {
|
||||
curl_mprintf("curl_easy_perform() failed. e = %d\n", code);
|
||||
curl_mprintf("curl_easy_perform() failed. e = %d\n", (int)code);
|
||||
}
|
||||
test_cleanup:
|
||||
curl_slist_free_all(pHeaderList);
|
||||
|
|
|
|||
|
|
@ -66,11 +66,11 @@ static CURLcode test_lib1523(const char *URL)
|
|||
|
||||
result = run(curl, 1, 2);
|
||||
if(result)
|
||||
curl_mfprintf(stderr, "error (%d) %s\n", result, buffer);
|
||||
curl_mfprintf(stderr, "error (%d) %s\n", (int)result, buffer);
|
||||
|
||||
result = run(curl, 12000, 1);
|
||||
if(result != CURLE_OPERATION_TIMEDOUT)
|
||||
curl_mfprintf(stderr, "error (%d) %s\n", result, buffer);
|
||||
curl_mfprintf(stderr, "error (%d) %s\n", (int)result, buffer);
|
||||
else
|
||||
result = CURLE_OK;
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ static CURLcode test_lib1531(const char *URL)
|
|||
msg = curl_multi_info_read(multi, &msgs_left);
|
||||
if(msg && msg->msg == CURLMSG_DONE) {
|
||||
curl_mprintf("HTTP transfer completed with status %d\n",
|
||||
msg->data.result);
|
||||
(int)msg->data.result);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ static CURLcode test_lib1532(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_perform() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ static CURLcode test_lib1532(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(httpcode != 200) {
|
||||
|
|
@ -66,7 +66,7 @@ static CURLcode test_lib1532(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(httpcode) {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ static CURLcode perform_and_check_connections(CURL *curl,
|
|||
|
||||
result = curl_easy_perform(curl);
|
||||
if(result != CURLE_OK) {
|
||||
curl_mfprintf(stderr, "curl_easy_perform() failed with %d\n", result);
|
||||
curl_mfprintf(stderr, "curl_easy_perform() failed with %d\n", (int)result);
|
||||
return TEST_ERR_MAJOR_BAD;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static CURLcode test_lib1534(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(filetime != -1) {
|
||||
|
|
@ -60,7 +60,7 @@ static CURLcode test_lib1534(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_perform() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ static CURLcode test_lib1534(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(filetime != 30) {
|
||||
|
|
@ -97,7 +97,7 @@ static CURLcode test_lib1534(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(filetime != -1) {
|
||||
|
|
@ -117,7 +117,7 @@ static CURLcode test_lib1534(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(filetime != -1) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ static CURLcode test_lib1535(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(protocol) {
|
||||
|
|
@ -60,7 +60,7 @@ static CURLcode test_lib1535(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_perform() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ static CURLcode test_lib1535(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(protocol != CURLPROTO_HTTP) {
|
||||
|
|
@ -100,7 +100,7 @@ static CURLcode test_lib1535(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(protocol) {
|
||||
|
|
@ -121,7 +121,7 @@ static CURLcode test_lib1535(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(protocol) {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static CURLcode test_lib1536(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(scheme) {
|
||||
|
|
@ -59,7 +59,7 @@ static CURLcode test_lib1536(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_perform() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ static CURLcode test_lib1536(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(!scheme || memcmp(scheme, "http", 5) != 0) {
|
||||
|
|
@ -96,7 +96,7 @@ static CURLcode test_lib1536(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(scheme) {
|
||||
|
|
@ -115,7 +115,7 @@ static CURLcode test_lib1536(const char *URL)
|
|||
if(result) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
|
||||
__FILE__, __LINE__, result, curl_easy_strerror(result));
|
||||
__FILE__, __LINE__, (int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
if(scheme) {
|
||||
|
|
|
|||
|
|
@ -43,16 +43,16 @@ static CURLcode test_lib1538(const char *URL)
|
|||
curl_url_strerror((CURLUcode)-INT_MAX);
|
||||
/* NOLINTEND(clang-analyzer-optin.core.EnumCastOutOfRange) */
|
||||
for(easyret = CURLE_OK; easyret <= CURL_LAST; easyret++) {
|
||||
curl_mprintf("e%d: %s\n", easyret, curl_easy_strerror(easyret));
|
||||
curl_mprintf("e%d: %s\n", (int)easyret, curl_easy_strerror(easyret));
|
||||
}
|
||||
for(mresult = CURLM_CALL_MULTI_PERFORM; mresult <= CURLM_LAST; mresult++) {
|
||||
curl_mprintf("m%d: %s\n", mresult, curl_multi_strerror(mresult));
|
||||
}
|
||||
for(shareret = CURLSHE_OK; shareret <= CURLSHE_LAST; shareret++) {
|
||||
curl_mprintf("s%d: %s\n", shareret, curl_share_strerror(shareret));
|
||||
curl_mprintf("s%d: %s\n", (int)shareret, curl_share_strerror(shareret));
|
||||
}
|
||||
for(urlret = CURLUE_OK; urlret <= CURLUE_LAST; urlret++) {
|
||||
curl_mprintf("u%d: %s\n", urlret, curl_url_strerror(urlret));
|
||||
curl_mprintf("u%d: %s\n", (int)urlret, curl_url_strerror(urlret));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ struct t1541_transfer_status {
|
|||
static void t1541_geterr(const char *name, CURLcode val, int lineno)
|
||||
{
|
||||
curl_mprintf("CURLINFO_%s returned %d, \"%s\" on line %d\n",
|
||||
name, val, curl_easy_strerror(val), lineno);
|
||||
name, (int)val, curl_easy_strerror(val), lineno);
|
||||
}
|
||||
|
||||
static void report_time(const char *key, const char *where, curl_off_t time,
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue