From fa2d6ba84d7f87148738f3cbccf29016dd324f87 Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Sun, 16 Sep 2018 22:04:49 +0200 Subject: printf: fix format specifiers Closes #3426 --- tests/unit/unit1650.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/unit/unit1650.c') diff --git a/tests/unit/unit1650.c b/tests/unit/unit1650.c index 4962bfac9..adc91236a 100644 --- a/tests/unit/unit1650.c +++ b/tests/unit/unit1650.c @@ -160,13 +160,13 @@ UNITTEST_START int rc = doh_encode(req[i].name, req[i].type, buffer, sizeof(buffer), &size); if(rc != req[i].rc) { - fprintf(stderr, "req %d: Expected return code %d got %d\n", i, + fprintf(stderr, "req %zu: Expected return code %d got %d\n", i, req[i].rc, rc); return 1; } else if(size != req[i].size) { - fprintf(stderr, "req %d: Expected size %d got %d\n", i, - (int)req[i].size, (int)size); + fprintf(stderr, "req %zu: Expected size %zu got %zu\n", i, + req[i].size, size); fprintf(stderr, "DNS encode made: %s\n", hexdump(buffer, size)); return 2; } @@ -188,7 +188,7 @@ UNITTEST_START rc = doh_decode((unsigned char *)resp[i].packet, resp[i].size, resp[i].type, &d); if(rc != resp[i].rc) { - fprintf(stderr, "resp %d: Expected return code %d got %d\n", i, + fprintf(stderr, "resp %zu: Expected return code %d got %d\n", i, resp[i].rc, rc); return 4; } @@ -229,7 +229,7 @@ UNITTEST_START } de_cleanup(&d); if(resp[i].out && strcmp((char *)buffer, resp[i].out)) { - fprintf(stderr, "resp %d: Expected %s got %s\n", i, + fprintf(stderr, "resp %zu: Expected %s got %s\n", i, resp[i].out, buffer); return 1; } @@ -244,7 +244,7 @@ UNITTEST_START rc = doh_decode((unsigned char *)full49, i, DNS_TYPE_A, &d); if(!rc) { /* none of them should work */ - fprintf(stderr, "%d: %d\n", i, rc); + fprintf(stderr, "%zu: %d\n", i, rc); return 5; } } @@ -257,7 +257,7 @@ UNITTEST_START DNS_TYPE_A, &d); if(!rc) { /* none of them should work */ - fprintf(stderr, "2 %d: %d\n", i, rc); + fprintf(stderr, "2 %zu: %d\n", i, rc); return 7; } } -- cgit v1.2.3