[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10444: Try to fix some mipspro compiler warnings. There will still (in tor/trunk: . src/common src/or)



Author: nickm
Date: 2007-06-02 08:44:54 -0400 (Sat, 02 Jun 2007)
New Revision: 10444

Modified:
   tor/trunk/
   tor/trunk/src/common/mempool.c
   tor/trunk/src/or/config.c
   tor/trunk/src/or/dnsserv.c
   tor/trunk/src/or/relay.c
   tor/trunk/src/or/routerlist.c
Log:
 r13143@catbus:  nickm | 2007-06-01 16:43:40 -0400
 Try to fix some mipspro compiler warnings. There will still be some left.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r13143] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/common/mempool.c
===================================================================
--- tor/trunk/src/common/mempool.c	2007-06-01 21:02:05 UTC (rev 10443)
+++ tor/trunk/src/common/mempool.c	2007-06-02 12:44:54 UTC (rev 10444)
@@ -344,7 +344,7 @@
 
   /* First, we figure out how much space to allow per item.  We'll want to
    * use make sure we have enough for the overhead plus the item size. */
-  alloc_size = STRUCT_OFFSET(mp_allocated_t, u.mem) + item_size;
+  alloc_size = (size_t)(STRUCT_OFFSET(mp_allocated_t, u.mem) + item_size);
   /* If the item_size is less than sizeof(next_free), we need to make
    * the allocation bigger. */
   if (alloc_size < sizeof(mp_allocated_t))

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2007-06-01 21:02:05 UTC (rev 10443)
+++ tor/trunk/src/or/config.c	2007-06-02 12:44:54 UTC (rev 10444)
@@ -2351,7 +2351,7 @@
                                int compatible)
 {
   tor_assert(auth);
-  *auth = 0;
+  *auth = NO_AUTHORITY;
   SMARTLIST_FOREACH(list, const char *, string, {
     if (!strcasecmp(string, "v1"))
       *auth |= V1_AUTHORITY;

Modified: tor/trunk/src/or/dnsserv.c
===================================================================
--- tor/trunk/src/or/dnsserv.c	2007-06-01 21:02:05 UTC (rev 10443)
+++ tor/trunk/src/or/dnsserv.c	2007-06-02 12:44:54 UTC (rev 10444)
@@ -41,6 +41,7 @@
     evdns_server_request_respond(req, DNS_ERR_SERVERFAILED);
     return;
   }
+  (void) addrlen;
   sa = (struct sockaddr*) &addr;
   if (sa->sa_family != AF_INET) {
     /* XXXX020 Handle IPV6 */

Modified: tor/trunk/src/or/relay.c
===================================================================
--- tor/trunk/src/or/relay.c	2007-06-01 21:02:05 UTC (rev 10443)
+++ tor/trunk/src/or/relay.c	2007-06-02 12:44:54 UTC (rev 10444)
@@ -525,10 +525,8 @@
                              size_t payload_len)
 {
   /* XXXX NM Split this function into a separate versions per circuit type? */
-  crypt_path_t *cpath_layer;
   circuit_t *circ;
   tor_assert(fromconn);
-  cpath_layer = fromconn ? fromconn->cpath_layer : NULL;
   circ = fromconn->on_circuit;
 
   if (fromconn->_base.marked_for_close) {
@@ -1890,14 +1888,14 @@
 circuit_clear_cell_queue(circuit_t *circ, or_connection_t *orconn)
 {
   cell_queue_t *queue;
-  int streams_blocked;
+  // int streams_blocked; // XXXX020 use this for something, or remove it.
   if (circ->n_conn == orconn) {
     queue = &circ->n_conn_cells;
-    streams_blocked = circ->streams_blocked_on_n_conn;
+    // streams_blocked = circ->streams_blocked_on_n_conn;
   } else {
     or_circuit_t *orcirc = TO_OR_CIRCUIT(circ);
     queue = &orcirc->p_conn_cells;
-    streams_blocked = circ->streams_blocked_on_p_conn;
+    // streams_blocked = circ->streams_blocked_on_p_conn;
   }
 
   if (queue->n)

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-06-01 21:02:05 UTC (rev 10443)
+++ tor/trunk/src/or/routerlist.c	2007-06-02 12:44:54 UTC (rev 10444)
@@ -561,7 +561,7 @@
       router_load_extrainfo_from_string(contents, NULL,SAVED_IN_JOURNAL, NULL);
     else
       router_load_routers_from_string(contents, NULL, SAVED_IN_JOURNAL, NULL);
-    stats->journal_len = st.st_size;
+    stats->journal_len = (size_t) st.st_size;
     tor_free(contents);
   }