diff options
-rw-r--r-- | src/common/mempool.c | 2 | ||||
-rw-r--r-- | src/or/config.c | 2 | ||||
-rw-r--r-- | src/or/dnsserv.c | 1 | ||||
-rw-r--r-- | src/or/relay.c | 8 | ||||
-rw-r--r-- | src/or/routerlist.c | 2 |
5 files changed, 7 insertions, 8 deletions
diff --git a/src/common/mempool.c b/src/common/mempool.c index c7c25098ce..f933f58440 100644 --- a/src/common/mempool.c +++ b/src/common/mempool.c @@ -344,7 +344,7 @@ mp_pool_new(size_t item_size, size_t chunk_capacity) /* 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)) diff --git a/src/or/config.c b/src/or/config.c index 37dcc39312..a68f65ecf3 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -2351,7 +2351,7 @@ parse_authority_type_from_list(smartlist_t *list, authority_type_t *auth, int compatible) { tor_assert(auth); - *auth = 0; + *auth = NO_AUTHORITY; SMARTLIST_FOREACH(list, const char *, string, { if (!strcasecmp(string, "v1")) *auth |= V1_AUTHORITY; diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c index 4b61f362f1..2949882cbe 100644 --- a/src/or/dnsserv.c +++ b/src/or/dnsserv.c @@ -41,6 +41,7 @@ evdns_server_callback(struct evdns_server_request *req, void *_data) evdns_server_request_respond(req, DNS_ERR_SERVERFAILED); return; } + (void) addrlen; sa = (struct sockaddr*) &addr; if (sa->sa_family != AF_INET) { /* XXXX020 Handle IPV6 */ diff --git a/src/or/relay.c b/src/or/relay.c index d83247d16c..0a34687d6c 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -525,10 +525,8 @@ connection_edge_send_command(edge_connection_t *fromconn, 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 @@ void 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) diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 069c819c17..2faa36e207 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -561,7 +561,7 @@ router_reload_router_list_impl(int extrainfo) 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); } |