commit 2e980e9a2ed1b6cc75c0b1d6107ad6b91cf97a2e Author: rl1987 rl1987@sdf.lonestar.org Date: Thu Oct 29 13:12:29 2015 +0100
Fix GCC warnings. --- src/test/test_dns.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/src/test/test_dns.c b/src/test/test_dns.c index 6ba9cf4..b40a482 100644 --- a/src/test/test_dns.c +++ b/src/test/test_dns.c @@ -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));
tor-commits@lists.torproject.org