[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 166/178: tests: Fix format specifiers
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 166/178: tests: Fix format specifiers |
Date: |
Wed, 23 May 2018 12:26:41 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit df3647c9c8f145c813ec8c7bd4ec5a6f81d89666
Author: Rikard Falkeborn <address@hidden>
AuthorDate: Sun May 6 21:20:32 2018 +0200
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(-)
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; i<size; i += width) {
- fprintf(stream, "%04x: ", (int)i);
+ fprintf(stream, "%04zx: ", i);
if(!nohex) {
/* hex not disabled, show it */
diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c
index 5c68b3b1b..63e022b33 100644
--- a/tests/libtest/testtrace.c
+++ b/tests/libtest/testtrace.c
@@ -43,12 +43,12 @@ void libtest_debug_dump(const char *timebuf, const char
*text, FILE *stream,
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stream, "%s%s, %d bytes (0x%x)\n", timebuf, text,
- (int)size, (int)size);
+ fprintf(stream, "%s%s, %zu bytes (0x%zx)\n", timebuf, text,
+ size, size);
for(i = 0; i < size; i += width) {
- fprintf(stream, "%04x: ", (int)i);
+ fprintf(stream, "%04zx: ", i);
if(!nohex) {
/* hex not disabled, show it */
diff --git a/tests/server/fake_ntlm.c b/tests/server/fake_ntlm.c
index ca2b438b6..ec127a8af 100644
--- a/tests/server/fake_ntlm.c
+++ b/tests/server/fake_ntlm.c
@@ -37,7 +37,7 @@
/* include memdebug.h last */
#include "memdebug.h"
-#define LOGFILE "log/fake_ntlm%d.log"
+#define LOGFILE "log/fake_ntlm%ld.log"
const char *serverlogfile;
diff --git a/tests/unit/unit1309.c b/tests/unit/unit1309.c
index 7d3c00017..9d885389d 100644
--- a/tests/unit/unit1309.c
+++ b/tests/unit/unit1309.c
@@ -97,7 +97,7 @@ UNITTEST_START
int rem = (i + 7)%NUM_NODES;
printf("Tree look:\n");
splayprint(root, 0, 1);
- printf("remove pointer %d, payload %zd\n", rem,
+ printf("remove pointer %d, payload %zu\n", rem,
*(size_t *)nodes[rem].payload);
rc = Curl_splayremovebyaddr(root, &nodes[rem], &root);
if(rc) {
@@ -130,7 +130,7 @@ UNITTEST_START
tv_now.tv_usec = i;
root = Curl_splaygetbest(tv_now, root, &removed);
while(removed != NULL) {
- printf("removed payload %zd[%zd]\n",
+ printf("removed payload %zu[%zu]\n",
(*(size_t *)removed->payload) / 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);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 177/178: RELEASE-NOTES: 7.60.0 release, (continued)
- [GNUnet-SVN] [gnurl] 177/178: RELEASE-NOTES: 7.60.0 release, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 155/178: travis: add a build using WolfSSL, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 146/178: http: don't set the "rewind" flag when not uploading anything, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 99/178: tool_help: clarify --max-time unit of time is seconds, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 90/178: schannel: add support for CURLOPT_CAINFO, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 88/178: docs: fix typos, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 157/178: travis: add build using NSS, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 150/178: vtls: fix missing commas, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 153/178: RELEASE-NOTES: synced, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 160/178: cookies: do not take cookie name as a parameter, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 166/178: tests: Fix format specifiers,
gnunet <=
- [GNUnet-SVN] [gnurl] 171/178: http2: use the correct function pointer typedef, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 167/178: ntlm: Fix format specifiers, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 77/178: system.h: Add sparcv8plus to oracle/sunpro 32-bit detection, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 80/178: test1148: tolerate progress updates better, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 65/178: test1136: fix cookie order after commit c990eadd1277, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 84/178: schannel: add client certificate authentication, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 74/178: duphandle: make sure CURLOPT_RESOLVE is duplicated fine too, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 66/178: winbuild: updated the documentation, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 79/178: ssh: show libSSH2 error code when closing fails, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 92/178: detect_proxy: only show proxy use if it had contents, gnunet, 2018/05/23