From abf8d0315d319b577249e5bdea8366ac0a8b3cb4 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 8 Mar 2026 20:38:56 +0100 Subject: [PATCH] fixes --- tests/libtest/first.c | 2 +- tests/server/dnsd.c | 4 ++-- tests/server/mqttd.c | 2 +- tests/tunit/tool1621.c | 2 +- tests/unit/unit1323.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/libtest/first.c b/tests/libtest/first.c index 37f4e85fdd..1093ddef7b 100644 --- a/tests/libtest/first.c +++ b/tests/libtest/first.c @@ -182,7 +182,7 @@ CURLcode ws_recv_pong(CURL *curl, const char *expected_payload) 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; } diff --git a/tests/server/dnsd.c b/tests/server/dnsd.c index 485be0d573..ee3aa52eb1 100644 --- a/tests/server/dnsd.c +++ b/tests/server/dnsd.c @@ -388,7 +388,7 @@ create_resp(int qid, const struct sockaddr *addr, curl_socklen_t addrlen, for(a = 0; a < ancount_a; a++) { const unsigned char *store = ipv4_pref; add_answer(bytes, &i, store, sizeof(ipv4_pref), QTYPE_A); - logmsg("[%d] response A (%x) '%s'", qid, QTYPE_A, + logmsg("[%d] response A (%x) '%s'", qid, (unsigned int)QTYPE_A, curlx_inet_ntop(AF_INET, store, addrbuf, sizeof(addrbuf))); } if(!ancount_a) @@ -400,7 +400,7 @@ create_resp(int qid, const struct sockaddr *addr, curl_socklen_t addrlen, for(a = 0; a < ancount_aaaa; a++) { const unsigned char *store = ipv6_pref; add_answer(bytes, &i, store, sizeof(ipv6_pref), QTYPE_AAAA); - logmsg("[%d] response AAAA (%x) '%s'", qid, QTYPE_AAAA, + logmsg("[%d] response AAAA (%x) '%s'", qid, (unsigned int)QTYPE_AAAA, curlx_inet_ntop(AF_INET6, store, addrbuf, sizeof(addrbuf))); } if(!ancount_aaaa) diff --git a/tests/server/mqttd.c b/tests/server/mqttd.c index 23eefa65aa..ae9f080fb5 100644 --- a/tests/server/mqttd.c +++ b/tests/server/mqttd.c @@ -522,7 +522,7 @@ static curl_socket_t mqttit(curl_socket_t fd) /* check the length of the payload */ if((ssize_t)payload_len != (rc - 12)) { logmsg("Payload length mismatch, expected %zx got %zx", - rc - 12, payload_len); + (size_t)(rc - 12), payload_len); goto end; } /* check the length of the client ID */ diff --git a/tests/tunit/tool1621.c b/tests/tunit/tool1621.c index 35ac1a3b87..6965d14706 100644 --- a/tests/tunit/tool1621.c +++ b/tests/tunit/tool1621.c @@ -71,7 +71,7 @@ static CURLcode test_tool1621(const char *arg) const char *url = tests[i].input; char *stripped = stripcredentials(url); const char *strippedstr = stripped ? stripped : "(null)"; - curl_mprintf("Test %u got input \"%s\", output: \"%s\", " + curl_mprintf("Test %d got input \"%s\", output: \"%s\", " "expected: \"%s\"\n", i, tests[i].input, strippedstr, tests[i].output); diff --git a/tests/unit/unit1323.c b/tests/unit/unit1323.c index c705dc96eb..86eb4e25cc 100644 --- a/tests/unit/unit1323.c +++ b/tests/unit/unit1323.c @@ -45,7 +45,7 @@ static CURLcode test_unit1323(const char *arg) for(i = 0; i < CURL_ARRAYSIZE(tests); i++) { timediff_t result = curlx_timediff_ms(tests[i].first, tests[i].second); if(result != tests[i].result) { - curl_mprintf("%ld.%06u to %ld.%06u got %" FMT_TIMEDIFF_T + curl_mprintf("%ld.%06d to %ld.%06d got %" FMT_TIMEDIFF_T ", but expected %" FMT_TIMEDIFF_T "\n", (long)tests[i].first.tv_sec, tests[i].first.tv_usec,