]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
clean up some warnings
authorRoger Dingledine <arma@torproject.org>
Sat, 17 Apr 2004 06:34:20 +0000 (06:34 +0000)
committerRoger Dingledine <arma@torproject.org>
Sat, 17 Apr 2004 06:34:20 +0000 (06:34 +0000)
svn:r1651

src/or/main.c
src/or/onion.c

index 6e8064399a9e4ed6a9fb789d572bec459f79f7f8..c80737bf56d6fef39fd2ed8b9138874e5ed56e00 100644 (file)
@@ -678,16 +678,16 @@ static void dumpstats(int severity) {
 
   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 aa93d81b790b9ac8ac3aa457447439116414da6e..8939a3d2e34b80a7490878ac731f1472c7e354fa 100644 (file)
@@ -363,6 +363,7 @@ static routerinfo_t *choose_good_exit_server(uint8_t purpose, routerlist_t *dir)
       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,