[tor-commits] [tor/master] Fix compile warnings wrt printf formating of int64_t

nickm at torproject.org nickm at torproject.org
Thu Jun 13 14:32:14 UTC 2013


commit e61df2ec651345f1c46777105bbae69916402ecd
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Jun 13 10:30:34 2013 -0400

    Fix compile warnings wrt printf formating of int64_t
---
 src/or/circuitmux.c |   27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/or/circuitmux.c b/src/or/circuitmux.c
index a6256f8..f579c3e 100644
--- a/src/or/circuitmux.c
+++ b/src/or/circuitmux.c
@@ -539,14 +539,17 @@ circuitmux_free(circuitmux_t *cmux)
     global_destroy_ctr -= cmux->destroy_cell_queue.n;
     log_debug(LD_CIRC,
               "Freeing cmux at %p with %u queued destroys; the last cmux "
-              "destroy balance was %ld, global is %ld\n",
+              "destroy balance was "I64_FORMAT", global is "I64_FORMAT,
               cmux, cmux->destroy_cell_queue.n,
-              cmux->destroy_ctr, global_destroy_ctr);
+              I64_PRINTF_ARG(cmux->destroy_ctr),
+              I64_PRINTF_ARG(global_destroy_ctr));
   } else {
     log_debug(LD_CIRC,
               "Freeing cmux at %p with no queued destroys, the cmux destroy "
-              "balance was %ld, global is %ld\n",
-              cmux, cmux->destroy_ctr, global_destroy_ctr);
+              "balance was "I64_FORMAT", global is "I64_FORMAT,
+              cmux,
+              I64_PRINTF_ARG(cmux->destroy_ctr),
+              I64_PRINTF_ARG(global_destroy_ctr));
   }
 
   cell_queue_clear(&cmux->destroy_cell_queue);
@@ -1543,9 +1546,11 @@ circuitmux_notify_xmit_destroy(circuitmux_t *cmux)
   --(cmux->destroy_ctr);
   --(global_destroy_ctr);
   log_debug(LD_CIRC,
-            "Cmux at %p sent a destroy, cmux counter is now %ld, "
-            "global counter is now %ld\n",
-            cmux, cmux->destroy_ctr, global_destroy_ctr);
+            "Cmux at %p sent a destroy, cmux counter is now "I64_FORMAT", "
+            "global counter is now "I64_FORMAT,
+            cmux,
+            I64_PRINTF_ARG(cmux->destroy_ctr),
+            I64_PRINTF_ARG(global_destroy_ctr));
 }
 
 /*
@@ -1848,9 +1853,11 @@ circuitmux_append_destroy_cell(channel_t *chan,
   ++(cmux->destroy_ctr);
   ++global_destroy_ctr;
   log_debug(LD_CIRC,
-            "Cmux at %p queued a destroy for circ %u, "
-            "cmux counter is now %ld, global counter is now %ld\n",
-            cmux, circ_id, cmux->destroy_ctr, global_destroy_ctr);
+            "Cmux at %p queued a destroy for circ %u, cmux counter is now "
+            I64_FORMAT", global counter is now "I64_FORMAT,
+            cmux, circ_id,
+            I64_PRINTF_ARG(cmux->destroy_ctr),
+            I64_PRINTF_ARG(global_destroy_ctr));
 
   /* XXXX Duplicate code from append_cell_to_circuit_queue */
   if (!channel_has_queued_writes(chan)) {





More information about the tor-commits mailing list