Browse Source

Fix printf type warning in the unit test

bel 9 năm trước cách đây
mục cha
commit
c174189036
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      test/public_server.c

+ 2 - 2
test/public_server.c

@@ -1956,7 +1956,7 @@ START_TEST(test_handle_form)
 	                "Content-Length: %u\r\n"
 	                "\r\n%s",
 	                body_len,
-	                multipart_body);
+	                (unsigned int)multipart_body);
 
 	ck_assert(client_conn != NULL);
 	test_sleep(1);
@@ -1991,7 +1991,7 @@ START_TEST(test_handle_form)
 		if (chunk_len > (body_len - body_sent)) {
 			chunk_len = body_len - body_sent;
 		}
-		mg_printf(client_conn, "%x\r\n", chunk_len);
+		mg_printf(client_conn, "%x\r\n", (unsigned int)chunk_len);
 		mg_write(client_conn, multipart_body + body_len, chunk_len);
 		mg_printf(client_conn, "\r\n");
 		body_sent += chunk_len;