From 209b135956b820df68006c6e208117e7a5ad8bc9 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 6 Sep 2009 16:47:48 +0000 Subject: [PATCH] msvc format string fixes --- examples/client_test.cpp | 2 +- src/http_tracker_connection.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 6bf5c0741..ba1a26643 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -1361,7 +1361,7 @@ int main(int argc, char* argv[]) out += str; snprintf(str, sizeof(str), "==== waste: %s fail: %s unchoked: %d / %d " - "bw queues: %8d (%d) | %8d (%d) cache: w: %"PRId64"%% r: %lld%% size: %s (%s) / %s dq: %"PRId64" ===\n" + "bw queues: %8d (%d) | %8d (%d) cache: w: %"PRId64"%% r: %"PRId64"%% size: %s (%s) / %s dq: %"PRId64" ===\n" , add_suffix(sess_stat.total_redundant_bytes).c_str() , add_suffix(sess_stat.total_failed_bytes).c_str() , sess_stat.num_unchoked, sess_stat.allowed_upload_slots diff --git a/src/http_tracker_connection.cpp b/src/http_tracker_connection.cpp index 88eb7f98e..aff077fe6 100644 --- a/src/http_tracker_connection.cpp +++ b/src/http_tracker_connection.cpp @@ -136,8 +136,8 @@ namespace libtorrent if (tracker_req().kind == tracker_request::announce_request) { char str[1024]; - snprintf(str, sizeof(str), "&peer_id=%s&port=%d&uploaded=%lld" - "&downloaded=%lld&left=%lld&compact=1&numwant=%d&key=%x&no_peer_id=1" + snprintf(str, sizeof(str), "&peer_id=%s&port=%d&uploaded=%"PRId64 + "&downloaded=%"PRId64"&left=%"PRId64"&compact=1&numwant=%d&key=%x&no_peer_id=1" , escape_string((const char*)&tracker_req().pid[0], 20).c_str() // the i2p tracker seems to verify that the port is not 0, // even though it ignores it otherwise