Fix GCC warnings.

This commit is contained in:
rl1987 2015-10-29 13:12:29 +01:00
parent 6d8952fae0
commit 2e980e9a2e

View File

@ -355,6 +355,8 @@ NS(test_main)(void *arg)
const tor_addr_t *resolved_addr;
tor_addr_t addr_to_compare;
(void)arg;
tor_addr_parse(&addr_to_compare, "8.8.8.8");
or_circuit_t *on_circ = tor_malloc_zero(sizeof(or_circuit_t));
@ -401,6 +403,8 @@ NS(test_main)(void *arg)
edge_connection_t *exitconn = create_valid_exitconn();
or_circuit_t *on_circ = tor_malloc_zero(sizeof(or_circuit_t));
(void)arg;
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
NS_MOCK(router_my_exit_policy_is_reject_star);
@ -442,6 +446,8 @@ NS(test_main)(void *arg)
edge_connection_t *exitconn = create_valid_exitconn();
or_circuit_t *on_circ = tor_malloc_zero(sizeof(or_circuit_t));
(void)arg;
NS_MOCK(router_my_exit_policy_is_reject_star);
TO_CONN(exitconn)->address = tor_strdup("invalid#@!.org");
@ -482,6 +488,8 @@ NS(test_main)(void *arg)
edge_connection_t *exitconn = create_valid_exitconn();
or_circuit_t *on_circ = tor_malloc_zero(sizeof(or_circuit_t));
(void)arg;
TO_CONN(exitconn)->address = tor_strdup("127.0.0.1.in-addr.arpa");
NS_MOCK(router_my_exit_policy_is_reject_star);
@ -541,6 +549,8 @@ NS(test_main)(void *arg)
cache_entry->minheap_idx = -1;
cache_entry->expire = time(NULL) + 60 * 60;
(void)arg;
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
strlcpy(cache_entry->address, TO_CONN(exitconn)->address,
@ -597,6 +607,8 @@ NS(set_exitconn_info_from_resolve)(edge_connection_t *exitconn,
last_exitconn = exitconn;
last_resolve = (cached_resolve_t *)resolve;
(void)hostname_out;
return 0;
}
@ -617,6 +629,8 @@ NS(test_main)(void *arg)
cache_entry->minheap_idx = -1;
cache_entry->expire = time(NULL) + 60 * 60;
(void)arg;
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
strlcpy(cache_entry->address, TO_CONN(exitconn)->address,
@ -689,6 +703,8 @@ NS(test_main)(void *arg)
cached_resolve_t *cache_entry = NULL;
cached_resolve_t query;
(void)arg;
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
strlcpy(query.address, TO_CONN(exitconn)->address, sizeof(query.address));