Merge remote-tracking branch 'tor-gitlab/mr/163' into maint-0.4.3

This commit is contained in:
Nick Mathewson 2021-01-19 12:53:44 -05:00
commit b7f886beb4
2 changed files with 10 additions and 6 deletions

3
changes/bug40113 Normal file
View File

@ -0,0 +1,3 @@
o Minor bugfixes (compilation):
- Resolve a compilation warning that could occur in test_connection.c.
Fixes bug 40113; bugfix on 0.2.9.3-alpha.

View File

@ -616,7 +616,8 @@ test_conn_download_status(void *arg)
connection_t *ap_conn = NULL; connection_t *ap_conn = NULL;
const struct testcase_t *tc = arg; const struct testcase_t *tc = arg;
consensus_flavor_t usable_flavor = (consensus_flavor_t)tc->setup_data; consensus_flavor_t usable_flavor =
networkstatus_parse_flavor_name((const char*) tc->setup_data);
/* The "other flavor" trick only works if there are two flavors */ /* The "other flavor" trick only works if there are two flavors */
tor_assert(N_CONSENSUS_FLAVORS == 2); tor_assert(N_CONSENSUS_FLAVORS == 2);
@ -981,9 +982,9 @@ struct testcase_t connection_tests[] = {
CONNECTION_TESTCASE(get_rsrc, TT_FORK, test_conn_get_rsrc_st), CONNECTION_TESTCASE(get_rsrc, TT_FORK, test_conn_get_rsrc_st),
CONNECTION_TESTCASE_ARG(download_status, TT_FORK, CONNECTION_TESTCASE_ARG(download_status, TT_FORK,
test_conn_download_status_st, FLAV_MICRODESC), test_conn_download_status_st, "microdesc"),
CONNECTION_TESTCASE_ARG(download_status, TT_FORK, CONNECTION_TESTCASE_ARG(download_status, TT_FORK,
test_conn_download_status_st, FLAV_NS), test_conn_download_status_st, "ns"),
CONNECTION_TESTCASE_ARG(https_proxy_connect, TT_FORK, CONNECTION_TESTCASE_ARG(https_proxy_connect, TT_FORK,
test_conn_proxy_connect_st, &PROXY_CONNECT_ARG), test_conn_proxy_connect_st, &PROXY_CONNECT_ARG),