From df3647c9c8f145c813ec8c7bd4ec5a6f81d89666 Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Sun, 6 May 2018 21:20:32 +0200 Subject: tests: Fix format specifiers --- tests/libtest/lib1509.c | 2 +- tests/libtest/lib1535.c | 2 +- tests/libtest/lib1536.c | 2 +- tests/libtest/lib552.c | 4 ++-- tests/libtest/testtrace.c | 6 +++--- tests/server/fake_ntlm.c | 2 +- tests/unit/unit1309.c | 4 ++-- tests/unit/unit1395.c | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) (limited to 'tests') diff --git a/tests/libtest/lib1509.c b/tests/libtest/lib1509.c index ccb668304..63bc589b1 100644 --- a/tests/libtest/lib1509.c +++ b/tests/libtest/lib1509.c @@ -69,7 +69,7 @@ int test(char *URL) goto test_cleanup; } - printf("header length is ........: %lu\n", headerSize); + printf("header length is ........: %ld\n", headerSize); printf("header length should be..: %lu\n", realHeaderSize); test_cleanup: diff --git a/tests/libtest/lib1535.c b/tests/libtest/lib1535.c index 32519f206..6ff03467d 100644 --- a/tests/libtest/lib1535.c +++ b/tests/libtest/lib1535.c @@ -71,7 +71,7 @@ int test(char *URL) } if(protocol != CURLPROTO_HTTP) { fprintf(stderr, "%s:%d protocol of http resource is incorrect; " - "expected %ld but is %ld\n", + "expected %d but is %ld\n", __FILE__, __LINE__, CURLPROTO_HTTP, protocol); res = CURLE_HTTP_RETURNED_ERROR; goto test_cleanup; diff --git a/tests/libtest/lib1536.c b/tests/libtest/lib1536.c index 7f5b61499..0c04bbf8e 100644 --- a/tests/libtest/lib1536.c +++ b/tests/libtest/lib1536.c @@ -72,7 +72,7 @@ int test(char *URL) if(memcmp(scheme, "HTTP", 5) != 0) { fprintf(stderr, "%s:%d scheme of http resource is incorrect; " "expected 'HTTP' but is %s\n", - __FILE__, __LINE__, CURLPROTO_HTTP, + __FILE__, __LINE__, (scheme == NULL ? "NULL" : "invalid")); res = CURLE_HTTP_RETURNED_ERROR; goto test_cleanup; diff --git a/tests/libtest/lib552.c b/tests/libtest/lib552.c index 5082eb044..83797f3c2 100644 --- a/tests/libtest/lib552.c +++ b/tests/libtest/lib552.c @@ -46,11 +46,11 @@ void dump(const char *text, /* without the hex output, we can fit more on screen */ width = 0x40; - fprintf(stream, "%s, %d bytes (0x%x)\n", text, (int)size, (int)size); + fprintf(stream, "%s, %zu bytes (0x%zx)\n", text, size, size); for(i = 0; ipayload) / 10, (*(size_t *)removed->payload) % 10); root = Curl_splaygetbest(tv_now, root, &removed); diff --git a/tests/unit/unit1395.c b/tests/unit/unit1395.c index 527f28142..78fdfa021 100644 --- a/tests/unit/unit1395.c +++ b/tests/unit/unit1395.c @@ -79,13 +79,13 @@ UNITTEST_START abort_unless(out != NULL, "returned NULL!"); if(strcmp(out, pairs[i].output)) { - fprintf(stderr, "Test %d: '%s' gave '%s' instead of '%s'\n", + fprintf(stderr, "Test %u: '%s' gave '%s' instead of '%s'\n", i, pairs[i].input, out, pairs[i].output); fail("Test case output mismatched"); fails++; } else - fprintf(stderr, "Test %d: OK\n", i); + fprintf(stderr, "Test %u: OK\n", i); free(out); } -- cgit v1.2.3