Browse Source

clean up some warnings

svn:r1651
Roger Dingledine 21 years ago
parent
commit
01e594e512
2 changed files with 7 additions and 6 deletions
  1. 6 6
      src/or/main.c
  2. 1 0
      src/or/onion.c

+ 6 - 6
src/or/main.c

@@ -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 */
   }

+ 1 - 0
src/or/onion.c

@@ -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,