[tor-commits] [tor/master] Don't use %zu in fuzz-http: windows doesn't like it.

nickm at torproject.org nickm at torproject.org
Mon Jan 30 14:10:04 UTC 2017


commit 088cc3604baa1325dd159fdd764088e4e1f8e2c7
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Jan 30 09:09:42 2017 -0500

    Don't use %zu in fuzz-http: windows doesn't like it.
---
 src/test/fuzz/fuzz_http.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/test/fuzz/fuzz_http.c b/src/test/fuzz/fuzz_http.c
index caad0b2..01c3815 100644
--- a/src/test/fuzz/fuzz_http.c
+++ b/src/test/fuzz/fuzz_http.c
@@ -20,8 +20,8 @@ static void
 mock_connection_write_to_buf_impl_(const char *string, size_t len,
                                    connection_t *conn, int zlib)
 {
-  log_debug(LD_GENERAL, "%sResponse:\n%zu\nConnection: %p\n%s\n",
-            zlib ? "Compressed " : "", len, conn, string);
+  log_debug(LD_GENERAL, "%sResponse:\n%u\nConnection: %p\n%s\n",
+            zlib ? "Compressed " : "", (unsigned)len, conn, string);
 }
 
 static int
@@ -35,11 +35,11 @@ mock_directory_handle_command_get(dir_connection_t *conn,
   log_debug(LD_GENERAL, "Method:\nGET\n");
 
   if (headers) {
-    log_debug(LD_GENERAL, "Header-Length:\n%zu\n", strlen(headers));
+    log_debug(LD_GENERAL, "Header-Length:\n%u\n", (unsigned)strlen(headers));
     log_debug(LD_GENERAL, "Headers:\n%s\n", headers);
   }
 
-  log_debug(LD_GENERAL, "Body-Length:\n%zu\n", body_len);
+  log_debug(LD_GENERAL, "Body-Length:\n%u\n", (unsigned)body_len);
   if (body) {
     log_debug(LD_GENERAL, "Body:\n%s\n", body);
   }
@@ -59,11 +59,11 @@ mock_directory_handle_command_post(dir_connection_t *conn,
   log_debug(LD_GENERAL, "Method:\nPOST\n");
 
   if (headers) {
-    log_debug(LD_GENERAL, "Header-Length:\n%zu\n", strlen(headers));
+    log_debug(LD_GENERAL, "Header-Length:\n%u\n", (unsigned)strlen(headers));
     log_debug(LD_GENERAL, "Headers:\n%s\n", headers);
   }
 
-  log_debug(LD_GENERAL, "Body-Length:\n%zu\n", body_len);
+  log_debug(LD_GENERAL, "Body-Length:\n%u\n", (unsigned)body_len);
   if (body) {
     log_debug(LD_GENERAL, "Body:\n%s\n", body);
   }



More information about the tor-commits mailing list