[or-cvs] r15093: fix compile with warnings on osx 10.5: double+int apparently (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Mon Jun 9 20:52:59 UTC 2008


Author: nickm
Date: 2008-06-09 16:52:59 -0400 (Mon, 09 Jun 2008)
New Revision: 15093

Modified:
   tor/trunk/
   tor/trunk/src/or/routerlist.c
Log:
 r16121 at tombo:  nickm | 2008-06-09 16:14:39 -0400
 fix compile with warnings on osx 10.5: double+int apparently gives a 64-bit value on some gccs



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r16121] on 49666b30-7950-49c5-bedf-9dc8f3168102

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2008-06-09 19:17:44 UTC (rev 15092)
+++ tor/trunk/src/or/routerlist.c	2008-06-09 20:52:59 UTC (rev 15093)
@@ -4189,6 +4189,7 @@
   log_debug(LD_DIR, "%d usable, %d present.", *num_usable, *num_present);
 }
 
+/* XXXX021 should this be static? */
 int
 count_loading_descriptors_progress(void)
 {
@@ -4209,9 +4210,9 @@
   fraction = num_present / (num_usable/4.);
   if (fraction > 1.0)
     return 0; /* it's not the number of descriptors holding us back */
-  return BOOTSTRAP_STATUS_LOADING_DESCRIPTORS +
-           fraction*(BOOTSTRAP_STATUS_CONN_OR-1 -
-                     BOOTSTRAP_STATUS_LOADING_DESCRIPTORS);
+  return BOOTSTRAP_STATUS_LOADING_DESCRIPTORS + (int)
+    (fraction*(BOOTSTRAP_STATUS_CONN_OR-1 -
+               BOOTSTRAP_STATUS_LOADING_DESCRIPTORS));
 }
 
 /** Change the value of have_min_dir_info, setting it true iff we have enough



More information about the tor-commits mailing list