Browse Source

rfc822: Fix test bugs on 64-bit platforms

This fixes some format string related bugs that show up on 64-bit builds.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
David Gibson 13 years ago
parent
commit
00b2678473
2 changed files with 2 additions and 2 deletions
  1. 1 1
      ccan/rfc822/test/run-hdr-and-body.c
  2. 1 1
      ccan/rfc822/test/run-unfold.c

+ 1 - 1
ccan/rfc822/test/run-hdr-and-body.c

@@ -45,7 +45,7 @@ static void check_header(struct rfc822_msg *msg,
 	allocation_failure_check();
 
 	ok(hname.ptr && bytestring_eq(hname, bytestring_from_string(name)),
-	   "Header name \"%.*s\"", hname.len, hname.ptr);
+	   "Header name \"%.*s\"", (int)hname.len, hname.ptr);
 
 	hvalue = rfc822_header_raw_value(msg, h);
 	allocation_failure_check();

+ 1 - 1
ccan/rfc822/test/run-unfold.c

@@ -89,7 +89,7 @@ static void check_folded_header(const char *buf, size_t len)
 	hunfold = rfc822_header_unfolded_value(msg, hdr);
 	allocation_failure_check();
 
-	ok(hunfold.len == strlen(UNFOLDED), "Unfolded length %d, should be %d",
+	ok(hunfold.len == strlen(UNFOLDED), "Unfolded length %zd, should be %zd",
 	   hunfold.len, strlen(UNFOLDED));
 	ok1(memcmp(hunfold.ptr, UNFOLDED, hunfold.len) == 0);