[or-cvs] clean up some warnings

Roger Dingledine arma at seul.org
Sat Apr 17 06:34:22 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	main.c onion.c 
Log Message:
clean up some warnings


Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.240
retrieving revision 1.241
diff -u -d -r1.240 -r1.241
--- main.c	13 Apr 2004 19:53:25 -0000	1.240
+++ main.c	17 Apr 2004 06:34:20 -0000	1.241
@@ -678,16 +678,16 @@
 
   for(i=0;i<nfds;i++) {
     conn = connection_array[i];
-    log(severity, "Conn %d (socket %d) type %d (%s), state %d (%s), created %ld secs ago",
+    log(severity, "Conn %d (socket %d) type %d (%s), state %d (%s), created %d secs ago",
       i, conn->s, conn->type, CONN_TYPE_TO_STRING(conn->type),
-      conn->state, conn_state_to_string[conn->type][conn->state], now - conn->timestamp_created);
+      conn->state, conn_state_to_string[conn->type][conn->state], (int)(now - conn->timestamp_created));
     if(!connection_is_listener(conn)) {
       log(severity,"Conn %d is to '%s:%d'.",i,conn->address, conn->port);
-      log(severity,"Conn %d: %d bytes waiting on inbuf (last read %ld secs ago)",i,
+      log(severity,"Conn %d: %d bytes waiting on inbuf (last read %d secs ago)",i,
              (int)buf_datalen(conn->inbuf),
-             now - conn->timestamp_lastread);
-      log(severity,"Conn %d: %d bytes waiting on outbuf (last written %ld secs ago)",i,
-             (int)buf_datalen(conn->outbuf), now - conn->timestamp_lastwritten);
+             (int)(now - conn->timestamp_lastread));
+      log(severity,"Conn %d: %d bytes waiting on outbuf (last written %d secs ago)",i,
+             (int)buf_datalen(conn->outbuf), (int)(now - conn->timestamp_lastwritten));
     }
     circuit_dump_by_conn(conn, severity); /* dump info about all the circuits using this conn */
   }

Index: onion.c
===================================================================
RCS file: /home/or/cvsroot/src/or/onion.c,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -d -r1.154 -r1.155
--- onion.c	14 Apr 2004 05:06:08 -0000	1.154
+++ onion.c	17 Apr 2004 06:34:20 -0000	1.155
@@ -363,6 +363,7 @@
       log_fn(LOG_WARN,"unhandled purpose %d", purpose);
       assert(0);
   }
+  return NULL; /* never reached */
 }
 
 cpath_build_state_t *onion_new_cpath_build_state(uint8_t purpose,



More information about the tor-commits mailing list