mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
Fix GCC warnings.
This commit is contained in:
parent
6d8952fae0
commit
2e980e9a2e
@ -355,6 +355,8 @@ NS(test_main)(void *arg)
|
|||||||
const tor_addr_t *resolved_addr;
|
const tor_addr_t *resolved_addr;
|
||||||
tor_addr_t addr_to_compare;
|
tor_addr_t addr_to_compare;
|
||||||
|
|
||||||
|
(void)arg;
|
||||||
|
|
||||||
tor_addr_parse(&addr_to_compare, "8.8.8.8");
|
tor_addr_parse(&addr_to_compare, "8.8.8.8");
|
||||||
|
|
||||||
or_circuit_t *on_circ = tor_malloc_zero(sizeof(or_circuit_t));
|
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();
|
edge_connection_t *exitconn = create_valid_exitconn();
|
||||||
or_circuit_t *on_circ = tor_malloc_zero(sizeof(or_circuit_t));
|
or_circuit_t *on_circ = tor_malloc_zero(sizeof(or_circuit_t));
|
||||||
|
|
||||||
|
(void)arg;
|
||||||
|
|
||||||
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
|
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
|
||||||
|
|
||||||
NS_MOCK(router_my_exit_policy_is_reject_star);
|
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();
|
edge_connection_t *exitconn = create_valid_exitconn();
|
||||||
or_circuit_t *on_circ = tor_malloc_zero(sizeof(or_circuit_t));
|
or_circuit_t *on_circ = tor_malloc_zero(sizeof(or_circuit_t));
|
||||||
|
|
||||||
|
(void)arg;
|
||||||
|
|
||||||
NS_MOCK(router_my_exit_policy_is_reject_star);
|
NS_MOCK(router_my_exit_policy_is_reject_star);
|
||||||
|
|
||||||
TO_CONN(exitconn)->address = tor_strdup("invalid#@!.org");
|
TO_CONN(exitconn)->address = tor_strdup("invalid#@!.org");
|
||||||
@ -482,6 +488,8 @@ NS(test_main)(void *arg)
|
|||||||
edge_connection_t *exitconn = create_valid_exitconn();
|
edge_connection_t *exitconn = create_valid_exitconn();
|
||||||
or_circuit_t *on_circ = tor_malloc_zero(sizeof(or_circuit_t));
|
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");
|
TO_CONN(exitconn)->address = tor_strdup("127.0.0.1.in-addr.arpa");
|
||||||
|
|
||||||
NS_MOCK(router_my_exit_policy_is_reject_star);
|
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->minheap_idx = -1;
|
||||||
cache_entry->expire = time(NULL) + 60 * 60;
|
cache_entry->expire = time(NULL) + 60 * 60;
|
||||||
|
|
||||||
|
(void)arg;
|
||||||
|
|
||||||
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
|
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
|
||||||
|
|
||||||
strlcpy(cache_entry->address, TO_CONN(exitconn)->address,
|
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_exitconn = exitconn;
|
||||||
last_resolve = (cached_resolve_t *)resolve;
|
last_resolve = (cached_resolve_t *)resolve;
|
||||||
|
|
||||||
|
(void)hostname_out;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -617,6 +629,8 @@ NS(test_main)(void *arg)
|
|||||||
cache_entry->minheap_idx = -1;
|
cache_entry->minheap_idx = -1;
|
||||||
cache_entry->expire = time(NULL) + 60 * 60;
|
cache_entry->expire = time(NULL) + 60 * 60;
|
||||||
|
|
||||||
|
(void)arg;
|
||||||
|
|
||||||
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
|
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
|
||||||
|
|
||||||
strlcpy(cache_entry->address, TO_CONN(exitconn)->address,
|
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 *cache_entry = NULL;
|
||||||
cached_resolve_t query;
|
cached_resolve_t query;
|
||||||
|
|
||||||
|
(void)arg;
|
||||||
|
|
||||||
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
|
TO_CONN(exitconn)->address = tor_strdup("torproject.org");
|
||||||
|
|
||||||
strlcpy(query.address, TO_CONN(exitconn)->address, sizeof(query.address));
|
strlcpy(query.address, TO_CONN(exitconn)->address, sizeof(query.address));
|
||||||
|
Loading…
Reference in New Issue
Block a user