]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Re-do a cast in order to make old buggy freebsd gcc happy
authorNick Mathewson <nickm@torproject.org>
Tue, 16 Jul 2013 18:48:12 +0000 (14:48 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 16 Jul 2013 18:48:12 +0000 (14:48 -0400)
Fix for #9254.  Bugfix on 0.2.4.14-alpha.

This is not actually a bug in the Tor code.

changes/bug9254 [new file with mode: 0644]
src/or/circuitlist.c

diff --git a/changes/bug9254 b/changes/bug9254
new file mode 100644 (file)
index 0000000..5179bdc
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Fix a spurious compilation warning with some older versions of
+      GCC on FreeBSD. Fixes bug 9254; bugfix on 0.2.4.14-alpha.
+
index 3dc362f50064a5985898ec6d98f786be96810587..daeaa37b1edec28f1edf613c4a218081ba01729b 100644 (file)
@@ -1518,8 +1518,10 @@ static size_t
 n_cells_in_circ_queues(const circuit_t *c)
 {
   size_t n = c->n_chan_cells.n;
-  if (! CIRCUIT_IS_ORIGIN(c))
-    n += TO_OR_CIRCUIT((circuit_t*)c)->p_chan_cells.n;
+  if (! CIRCUIT_IS_ORIGIN(c)) {
+    circuit_t *cc = (circuit_t *) c;
+    n += TO_OR_CIRCUIT(cc)->p_chan_cells.n;
+  }
   return n;
 }